From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by huchra.bufferbloat.net (Postfix, from userid 1000) id B0E9A21F0F0; Tue, 11 Jun 2013 08:09:41 -0700 (PDT) From: =?UTF-8?q?Dave=20T=C3=A4ht?= To: bloat-devel@lists.bufferbloat.net, cerowrt-devel@lists.bufferbloat.net Subject: [PATCH] skb_flow_dissector: Add support for 6in4 de-encapsulation Date: Tue, 11 Jun 2013 08:09:34 -0700 Message-Id: <1370963374-14470-1-git-send-email-dave.taht@bufferbloat.net> X-Mailer: git-send-email 1.7.1 X-BeenThere: bloat-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Developers working on AQM, device drivers, and networking stacks" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2013 15:09:41 -0000 The existing dissector handled gre and ipip encapsulated packets. This adds support for ipv6 (proto 41) encapsulated packets to the dissector, making possible a better fq_codel hash on 6in4, 6to4 tunnels. --- net/core/flow_dissector.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index 00ee068..a14bd91 100644 --- a/net/core/flow_dissector.c +++ b/net/core/flow_dissector.c @@ -54,6 +54,8 @@ ip: case __constant_htons(ETH_P_IPV6): { const struct ipv6hdr *iph; struct ipv6hdr _iph; + __be16 frag = 0; + int nhoff6; ipv6: iph = skb_header_pointer(skb, nhoff, sizeof(_iph), &_iph); if (!iph) @@ -63,6 +65,9 @@ ipv6: flow->src = (__force __be32)ipv6_addr_hash(&iph->saddr); flow->dst = (__force __be32)ipv6_addr_hash(&iph->daddr); nhoff += sizeof(struct ipv6hdr); + if((nhoff6 = ipv6_skip_exthdr(skb,nhoff,&ip_proto,&frag)) > -1) + nhoff += nhoff6; + if(frag != 0) ip_proto = 0; break; } case __constant_htons(ETH_P_8021Q): { @@ -138,6 +143,8 @@ ipv6: } break; } + case IPPROTO_IPV6: + proto = __constant_htons(ETH_P_IPV6); case IPPROTO_IPIP: goto again; default: -- 1.8.1.2