Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't create tunnel interface (antrea-tun0) when using Wireguard #5885

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pkg/agent/config/node_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,14 @@ func (nc *NetworkConfig) NeedsTunnelToPeer(peerIP net.IP, localIP *net.IPNet) bo
}

func (nc *NetworkConfig) NeedsTunnelInterface() bool {
return nc.TrafficEncapMode.SupportsEncap() || nc.EnableMulticlusterGW
// For encap or hybrid mode, we need to create the tunnel interface, except if we are using
// WireGuard, in which case inter-Node traffic always goes through the antrea-wg0 interface,
// and tunneling is managed by Linux, not OVS.
// If multi-cluster gateway is enabled, we always need the tunnel interface. For example,
// cross-cluster traffic from a regular Node to the gateway Node for the source cluster
// always goes through antrea-tun0, regardless of the actual "traffic mode" for the source
// cluster.
return (nc.TrafficEncapMode.SupportsEncap() && nc.TrafficEncryptionMode != TrafficEncryptionModeWireGuard) || nc.EnableMulticlusterGW
}

// NeedsDirectRoutingToPeer returns true if Pod traffic to peer Node needs a direct route installed to the routing table.
Expand Down
Loading