From: "Dave Täht" <dave.taht@bufferbloat.net>
To: bloat-devel@lists.bufferbloat.net, cerowrt-devel@lists.bufferbloat.net
Subject: [Cerowrt-devel] [PATCH] skb_flow_dissector: Add support for 6in4 de-encapsulation
Date: Tue, 11 Jun 2013 08:09:34 -0700 [thread overview]
Message-ID: <1370963374-14470-1-git-send-email-dave.taht@bufferbloat.net> (raw)
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
reply other threads:[~2013-06-11 15:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.bufferbloat.net/postorius/lists/cerowrt-devel.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1370963374-14470-1-git-send-email-dave.taht@bufferbloat.net \
--to=dave.taht@bufferbloat.net \
--cc=bloat-devel@lists.bufferbloat.net \
--cc=cerowrt-devel@lists.bufferbloat.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox