Historic archive of defunct list bloat-devel@lists.bufferbloat.net
 help / color / mirror / Atom feed
* [PATCH] skb_flow_dissector: Add support for 6in4 de-encapsulation
@ 2013-06-11 15:09 Dave Täht
  0 siblings, 0 replies; only message in thread
From: Dave Täht @ 2013-06-11 15:09 UTC (permalink / raw)
  To: bloat-devel, cerowrt-devel

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-11 15:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-11 15:09 [PATCH] skb_flow_dissector: Add support for 6in4 de-encapsulation Dave Täht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox