]> git.baikalelectronics.ru Git - kernel.git/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)
commit4fe7b11623d2359d416d2d0fd81fa44583ed512a
tree6eadca952e46bd6cd42c4463b92a45f3b8d8f92a
parent72c904173102b955a65c42aa68cf42a116009348
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 dee3f2db2278 (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