You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The previous commit added handling for errors that occurred when NAT was
applied to the inner header of an ICMP error packet too short to include
the inner TCP L4 checksum. That implementation decided whether the inner
packet had an L4 checksum by using the length attribute defined in RFC
4884: https://datatracker.ietf.org/doc/html/rfc4884.
However, the length attribute is optional. For example, even in Linux
kernel 6.17, ICMP error messages are sent without it:
https://github.com/torvalds/linux/blob/v6.17/net/ipv4/icmp.c#L734-L739.
Assuming that the attribute is always present is causing incorrect
behavior. When the attribute exists, it is placed in the reserved bits.
When it does not, the bits are zero-filled, and the logic wrongly assumes
that the inner TCP checksum is missing, in all cases.
This commit changes the logic to use the packet length stored in `ctx`
instead of relying on the length attribute.
Fix: 3c3f80bd48bc ("bpf: nat: Fix short packet MTU path discovery")
Signed-off-by: YushoYamaguchi <ysh.824@outlook.jp>
0 commit comments