]> git.baikalelectronics.ru Git - kernel.git/commit
fou, fou6: ICMP error handlers for FoU and GUE
authorStefano Brivio <sbrivio@redhat.com>
Thu, 8 Nov 2018 11:19:23 +0000 (12:19 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Nov 2018 01:13:08 +0000 (17:13 -0800)
commita56ddf3374c20094f99500b2c269b8be0cd598dc
tree03a60c4c9b5988ff6283467e31bf8ad8bdd49eea
parent51baa94611d1ef4eada33d6c0487d67d659783fa
fou, fou6: ICMP error handlers for FoU and GUE

As the destination port in FoU and GUE receiving sockets doesn't
necessarily match the remote destination port, we can't associate errors
to the encapsulating tunnels with a socket lookup -- we need to blindly
try them instead. This means we don't even know if we are handling errors
for FoU or GUE without digging into the packets.

Hence, implement a single handler for both, one for IPv4 and one for IPv6,
that will check whether the packet that generated the ICMP error used a
direct IP encapsulation or if it had a GUE header, and send the error to
the matching protocol handler, if any.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fou.c
net/ipv4/protocol.c
net/ipv6/fou6.c