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

Automated cherry pick of #5880: Fix incorrect MTU configurations (#5880) #5926: Ensure MTU is set correctly when WireGuard interface already #5927

Conversation

tnqn
Copy link
Member

@tnqn tnqn commented Jan 26, 2024

Cherry pick of #5880 #5926 on release-1.14.

#5880: Fix incorrect MTU configurations (#5880)
#5926: Ensure MTU is set correctly when WireGuard interface already

For details on the cherry pick process, see the cherry pick requests page.

hjiajing and others added 2 commits January 26, 2024 13:19
The commit fixes 3 incorrect MTU configurations:

1. When using the WireGuard encryption mode, the Pod eth0's MTU was not
correct. The MTU deducted Geneve overhead because the default tunnel
type is Geneve while it should deduct the WireGuard overhead as traffic
will be encrypted instead of encapsulated.

2. When using the GRE tunnel type, the Pod eth0's MTU was not correct.
The actual overhead is 14 outer MAC, 20 outer IP, and 8 GRE header
(4 standard header + 4 key field), summing up to 42 bytes.

3. When enabling Wireguard for Multicluster, the MTU of all Pod
interfaces and wireguard interface were reduced 130 bytes (50 for
geneve + 80 for wireguard), however, cross-cluster traffic sent from
Pods were not forwarded by wireguard interface. This is because traffic
originated from Pods will be encapsulated on gateway Node, and it's the
encapsulated packet which will be encrypted. If the wireguard interface
is set with the same MTU as the Pod interface, the encapsulated packet
will exceed wireguard interface's MTU.

Signed-off-by: Jiajing Hu <hjiajing@vmware.com>
Signed-off-by: Quan Tian <qtian@vmware.com>
Co-authored-by: Quan Tian <qtian@vmware.com>
…ntrea-io#5926)

In ce46eb1 ("Fix incorrect MTU configurations"), we changed
WireGuard interface's MTU in IPv4 case. However, if a cluster already
enables WireGuard, the WireGuard interface's MTU would remain unchanged
while new Pod would use a higher MTU, causing problems.

Signed-off-by: Quan Tian <qtian@vmware.com>
@tnqn tnqn added the kind/cherry-pick Categorizes issue or PR as related to the cherry-pick of a bug fix from the main branch to a release label Jan 26, 2024
@tnqn
Copy link
Member Author

tnqn commented Jan 26, 2024

/test-all
/test-ipv6-e2e
/test-ipv6-only-e2e
/test-multicluster-e2e

@tnqn tnqn requested review from luolanzone and hjiajing January 26, 2024 07:29
@tnqn tnqn merged commit ab3338a into antrea-io:release-1.14 Jan 26, 2024
50 of 53 checks passed
@tnqn tnqn deleted the automated-cherry-pick-of-#5880-#5926-upstream-release-1.14 branch January 26, 2024 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cherry-pick Categorizes issue or PR as related to the cherry-pick of a bug fix from the main branch to a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants