]> Pileus Git - ~andy/linux/commit
ip6tnl/sit: drop packet if ECN present with not-ECT
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Tue, 27 Nov 2012 03:07:11 +0000 (03:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Nov 2012 16:37:11 +0000 (11:37 -0500)
commitf4e0b4c5e1c3eac9b7376ce73fb63de436057db1
tree6eadca952e46bd6cd42c4463b92a45f3b8d8f92a
parente49cc34f7ac30304ef0563d2517f6c5f86525220
ip6tnl/sit: drop packet if ECN present with not-ECT

This patch reports the change made by Stephen Hemminger in ipip and gre[6] in
commit eccc1bb8d4b4 (tunnel: drop packet if ECN present with not-ECT).

Goal is to handle RFC6040, Section 4.2:

Default Tunnel Egress Behaviour.
 o If the inner ECN field is Not-ECT, the decapsulator MUST NOT
      propagate any other ECN codepoint onwards.  This is because the
      inner Not-ECT marking is set by transports that rely on dropped
      packets as an indication of congestion and would not understand or
      respond to any other ECN codepoint [RFC4774].  Specifically:

      *  If the inner ECN field is Not-ECT and the outer ECN field is
         CE, the decapsulator MUST drop the packet.

      *  If the inner ECN field is Not-ECT and the outer ECN field is
         Not-ECT, ECT(0), or ECT(1), the decapsulator MUST forward the
         outgoing packet with the ECN field cleared to Not-ECT.

The patch takes benefits from common function added in net/inet_ecn.h.

Like it was done for Xin4 tunnels, it adds logging to allow detecting broken
systems that set ECN bits incorrectly when tunneling (or an intermediate
router might be changing the header). Errors are also tracked via
rx_frame_error.

CC: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_tunnel.c
net/ipv6/sit.c