net: Simplify GRE case in flow_dissector
Do break when we see routing flag or a non-zero version number in GRE header. Acked-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ffaa31d794
commit
ce3b535547
|
@ -308,7 +308,9 @@ flow_label:
|
|||
* Only look inside GRE if version zero and no
|
||||
* routing
|
||||
*/
|
||||
if (!(hdr->flags & (GRE_VERSION|GRE_ROUTING))) {
|
||||
if (hdr->flags & (GRE_VERSION | GRE_ROUTING))
|
||||
break;
|
||||
|
||||
proto = hdr->proto;
|
||||
nhoff += 4;
|
||||
if (hdr->flags & GRE_CSUM)
|
||||
|
@ -331,8 +333,6 @@ flow_label:
|
|||
}
|
||||
goto again;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IPPROTO_IPIP:
|
||||
proto = htons(ETH_P_IP);
|
||||
goto ip;
|
||||
|
|
Loading…
Reference in New Issue