-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpf/nat: implement support of ICMP4 Error packet fragmentation needed
Running in masquerading BPF mode. Assuming that, Pod is sending a packet to the world of a size bigger than the accepted MTU in the networking path. A networking equipment in that networking path would return an ICMP Error packet with code ICMP_FRAG_NEEDED. According to the RFE 5508, that networking equipment should embed the original packet in its response. Previously because of the missing support of ICMP_FRAG_NEEDED, the NAT session to return the packet to Pod was never resolved. Meaning that the ICMP Error packet got dropped. a) The src IP of the packet becomes the networking equipment that is generating the error response. b) The protocol used for the response is ICMP where the packet sent may be TDP/UDP. This change is updating the NAT process to read the embedded packet in the ICMP Error packet that to determine the NAT session and send back the packet to Pod. The embbedded packet should also be rev-NATed back so the source IP is going back to the endpoint IP. This change is for IPv4. Fixes: #12968 Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>
- Loading branch information
Showing
3 changed files
with
582 additions
and
1 deletion.
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
Oops, something went wrong.