lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1441122196-11662-22-git-send-email-ahmed@gandi.net>
Date:	Tue,  1 Sep 2015 17:43:16 +0200
From:	Ahmed Amamou <ahmed@...di.net>
To:	netdev@...r.kernel.org
Cc:	William Dauchy <william@...di.net>, Ahmed Amamou <ahmed@...di.net>
Subject: [PATCH RFC v2 21/21] net: handle packet split for trill

From: William Dauchy <william@...di.net>

Signed-off-by: Ahmed Amamou <ahmed@...di.net>
Signed-off-by: William Dauchy <william@...di.net>
---
 net/core/flow_dissector.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 2a834c6..95c2794 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -18,6 +18,9 @@
 #include <linux/mpls.h>
 #include <net/flow_dissector.h>
 #include <scsi/fc/fc_fcoe.h>
+#ifdef CONFIG_TRILL
+#include <net/if_trill.h>
+#endif
 
 static bool skb_flow_dissector_uses_key(struct flow_dissector *flow_dissector,
 					enum flow_dissector_key_id key_id)
@@ -165,6 +168,34 @@ bool __skb_flow_dissect(const struct sk_buff *skb,
 
 again:
 	switch (proto) {
+#ifdef CONFIG_TRILL
+	case htons(ETH_P_TRILL): {
+		const struct trill_hdr *trillh;
+		struct trill_hdr _trillh;
+		const struct ethhdr *eth;
+		struct ethhdr _eth;
+		u8 trill_op_len;
+
+		trillh = __skb_header_pointer(skb, nhoff, sizeof(_trillh),
+					      data, hlen, &_trillh);
+		if (!trillh)
+			return false;
+		nhoff += sizeof(*trillh);
+		trill_op_len = trill_get_optslen(ntohs(trillh->th_flags));
+		if (trill_op_len)
+			nhoff += trill_op_len;
+
+		eth = __skb_header_pointer(skb, nhoff, sizeof(_eth), data,
+					   hlen, &_eth);
+		if (!eth)
+			return false;
+		proto = eth->h_proto;
+		nhoff += sizeof(*eth);
+
+		/* handle any vlan tag if present */
+		goto again;
+	}
+#endif
 	case htons(ETH_P_IP): {
 		const struct iphdr *iph;
 		struct iphdr _iph;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ