forked from projectcalico/felix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpf: fixup dst MAC for host networked nodeport backends
Because routing happens based on the dest IP (which is at that time the client's) before we get hands on the packet on HEP, the MAC is likely different (in the same subnet) than the MAC of the node that forwarded the nodeport to us. Therefore once we place the packet in VXLAN and thus change the dest IP, we must fix up the dest MAC based on what we recorded when we received the inbound packets. This is a similar case to the MAC fixing for regular pods. The only difference is that the src MAC is already set correctly if we are on the right device. We cannot handle the case (yet) when the routes to the original client and to the node on the other side of the vxland tunnel use different NICs. We would need to redirect the packet to the other NIC first.
- Loading branch information
1 parent
f7878a5
commit 63351c0
Showing
2 changed files
with
50 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters