Thread (11 messages) flat view 11 messages, 5 authors, 2016-10-24

Re: [PATCH net-next] flow_dissector: fix vlan tag handling

From: Arnd Bergmann <arnd@arndb.de>
Date: 2016-10-24 16:06:50
Also in: lkml

On Monday, October 24, 2016 10:17:36 AM CEST Jiri Pirko wrote:
Sat, Oct 22, 2016 at 10:30:08PM CEST, arnd@arndb.de wrote:
quoted
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 44e6ba9d3a6b..17be1b66cc41 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -246,13 +246,10 @@ bool __skb_flow_dissect(const struct sk_buff *skb,
	case htons(ETH_P_8021AD):
	case htons(ETH_P_8021Q): {
		const struct vlan_hdr *vlan;
+		struct vlan_hdr _vlan;
+		bool vlan_tag_present = (skb && skb_vlan_tag_present(skb));
Drop the unnecessary "()"
ok
quoted
-		if (skb && skb_vlan_tag_present(skb))
-			proto = skb->protocol;
This does not look correct. I believe that you need to set proto for
further processing.
Ah, of course. I only looked at the usage in this 'case' statement,
but the variable is also used after the 'goto again' and at
the end of the function.

	Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help