]> 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)
commitee617721beaf384d571a7d92a0465c0a956baf9f
tree03a60c4c9b5988ff6283467e31bf8ad8bdd49eea
parentf3e334d06c5dedbe02114ab625c89acba9a00907
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