-
Notifications
You must be signed in to change notification settings - Fork 370
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 #3516: Use uplink MAC as source if packet is output to #3528
Automated cherry pick of #3516: Use uplink MAC as source if packet is output to #3528
Conversation
/test-windows-all |
Codecov Report
@@ Coverage Diff @@
## release-1.2 #3528 +/- ##
================================================
+ Coverage 46.82% 60.46% +13.63%
================================================
Files 279 285 +6
Lines 21623 22455 +832
================================================
+ Hits 10125 13577 +3452
+ Misses 10168 7436 -2732
- Partials 1330 1442 +112
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/test-windows-networkpolicy |
/test-networkpolicy |
/test-e2e |
@tnqn The e2e failure is caused by |
@@ -308,6 +308,7 @@ func (c *client) l3FwdFlowToRemoteViaRouting(localGatewayMAC net.HardwareAddr, r | |||
Action().LoadRegRange(int(PortCacheReg), config.UplinkOFPort, ofPortRegRange). | |||
Action().LoadRegRange(int(marksReg), macRewriteMark, ofPortMarkRange). | |||
Action().GotoTable(conntrackCommitTable). | |||
Action().SetSrcMAC(c.nodeConfig.UplinkNetConfig.MAC). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the MAC already set in L3Forwarding table?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed.
With noEncap mode the Pod packet to remote Pod/Node is output to the uplink interface directly. This change modifies the source MAC with the uplink interface's MAC, so that it doesn't require hybrid configurations on the host interface. Signed-off-by: wenyingd <[email protected]>
b5350e4
to
1a8c213
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/test-all |
/test-conformance |
/skip-e2e failed on unrelated test: TestFlowAggregator |
/test-windows-conformance |
1 similar comment
/test-windows-conformance |
the Windows conformance test is failing due to
It seems to be the same as #2981, but the issue should have been fixed. |
@tnqn I saw the same error on the 1.2 branch, which does not include this change. Is this caused by testbed changes? |
/test-windows-conformance |
@tnqn The windows-conformance test passed. It should be related to the wrong configurations on the testbed. |
@xliuxu could you share more details about the misconfiguration? is it related to mac spoofguard? |
NetNat is introduced since Antrea v1.3 which is expected to perform SNAT for Pod-to-external traffic on the Windows host. But for Antrea v1.2-, SNAT is performed in OVS. Since the CI testbed is shared for all versions, and some misconfiguration leads to the NetNAT is included into the Windows snapshot, Antrea v1.2 traffic is enforced to perform SNAT on the host again after OVS operations. So the reply packet is mis-forwarded to the host instead of Pods. I am also a bit confused for I originally thought the host SNAT should not impact on the OVS (I thought the reply packet is first entering OVS pipeline from uplink and completed de-SNAT, and then output to the sender), but the fact is not as I expected. The reply was output to host directly. I would sync with OVS team for the root cause on the order of the OVS SNAT and host NetNat later. But after we remove the misconfiguration, the traffic is working well. |
Thanks @XinShuYang @wenyingd for the explanation. |
Cherry pick of #3516 on release-1.2.
#3516: Use uplink MAC as source if packet is output to
For details on the cherry pick process, see the cherry pick requests page.