Skip to content

Commit

Permalink
Merge pull request #7 from glazychev-art/vppinit_feat
Browse files Browse the repository at this point in the history
Make full use of the vppinit.LinkToAfPacket feature
  • Loading branch information
denis-tingaikin authored May 16, 2022
2 parents 3687416 + 86f2f75 commit 3b18144
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ func main() {
cancel()
<-vppErrCh
}()
config.TunnelIP = vppinit.Must(vppinit.LinkToAfPacket(ctx, vppConn, config.TunnelIP))

// ********************************************************************************
log.FromContext(ctx).Info("executing phase 3: start spire-server and spire-agent")
Expand Down Expand Up @@ -240,7 +241,6 @@ func main() {
ctx,
config,
vppConn,
vppinit.Must(vppinit.LinkToAfPacket(ctx, vppConn, config.TunnelIP)),
source)

srvErrCh := grpcutils.ListenAndServe(ctx, listenOn, server)
Expand Down Expand Up @@ -343,7 +343,7 @@ func main() {
<-vppErrCh
}

func createVl3Endpoint(ctx context.Context, config *Config, vppConn vpphelper.Connection, tunnelIP net.IP, source *workloadapi.X509Source) *grpc.Server {
func createVl3Endpoint(ctx context.Context, config *Config, vppConn vpphelper.Connection, source *workloadapi.X509Source) *grpc.Server {
vl3Endpoint := endpoint.NewServer(ctx,
spiffejwt.TokenGeneratorFunc(source, config.MaxTokenLifetime),
endpoint.WithName(config.Name),
Expand All @@ -361,7 +361,7 @@ func createVl3Endpoint(ctx context.Context, config *Config, vppConn vpphelper.Co
routes.NewServer(vppConn),
tag.NewServer(ctx, vppConn),
mechanisms.NewServer(map[string]networkservice.NetworkServiceServer{
wireguard.MECHANISM: wireguard.NewServer(vppConn, tunnelIP),
wireguard.MECHANISM: wireguard.NewServer(vppConn, config.TunnelIP),
kernel.MECHANISM: kernel.NewServer(vppConn),
}),
),
Expand Down

0 comments on commit 3b18144

Please sign in to comment.