]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: RFC 4884 partial support for SIT/GRE tunnels
authorEric Dumazet <edumazet@google.com>
Sun, 19 Jun 2016 04:52:06 +0000 (21:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 19 Jun 2016 05:11:39 +0000 (22:11 -0700)
commite27f25d486a33ba35df0c1914388e3674c124e41
tree22aced0e24480c8f2c62b89934868e64bbc70baa
parent645a4c3197d52f07143dc12a901c767fb399bd62
ipv6: RFC 4884 partial support for SIT/GRE tunnels

When receiving an ICMPv4 message containing extensions as
defined in RFC 4884, and translating it to ICMPv6 at SIT
or GRE tunnel, we need some extra manipulation in order
to properly forward the extensions.

This patch only takes care of Time Exceeded messages as they
are the ones that typically carry information from various
routers in a fabric during a traceroute session.

It also avoids complex skb logic if the data_len is not
a multiple of 8.

RFC states :

   The "original datagram" field MUST contain at least 128 octets.
   If the original datagram did not contain 128 octets, the
   "original datagram" field MUST be zero padded to 128 octets.

In practice routers use 128 bytes of original datagram, not more.

Initial translation was added in commit 240b7926f709
("sit: generate icmpv6 error when receiving icmpv4 error")

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Oussama Ghorbel <ghorbel@pivasoftware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/icmpv6.h
include/uapi/linux/icmp.h
net/ipv4/ip_gre.c
net/ipv6/icmp.c
net/ipv6/sit.c