diff --git a/pkg/networkservice/mechanisms/vxlan/common.go b/pkg/networkservice/mechanisms/vxlan/common.go index adb498c..5aa74f9 100644 --- a/pkg/networkservice/mechanisms/vxlan/common.go +++ b/pkg/networkservice/mechanisms/vxlan/common.go @@ -56,15 +56,12 @@ func add(ctx context.Context, logger log.Logger, conn *networkservice.Connection if !isClient { egressIP = mechanism.DstIP() remoteIP = mechanism.SrcIP() + port = mechanism.DstPort() } else { + port = mechanism.SrcPort() remoteIP = mechanism.DstIP() egressIP = mechanism.SrcIP() } - if !isClient { - port = mechanism.SrcPort() - } else { - port = mechanism.DstPort() - } ovsTunnelName := getTunnelPortName(remoteIP.String()) vxlanInterfacesMutex.Lock() defer vxlanInterfacesMutex.Unlock()