mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
flow_dissector: Add control/reporting of encapsulation
Add an input flag to flow dissector on rather dissection should stop when encapsulation is detected (IP/IP or GRE). Also, add a key_control flag that indicates encapsulation was encountered during the dissection. Signed-off-by: Tom Herbert <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
872b1abb1e
commit
823b969395
2 changed files with 17 additions and 0 deletions
|
|
@ -397,6 +397,11 @@ ip_proto_again:
|
|||
proto = eth->h_proto;
|
||||
nhoff += sizeof(*eth);
|
||||
}
|
||||
|
||||
key_control->encapsulation = 1;
|
||||
if (flags & FLOW_DISSECTOR_F_STOP_AT_ENCAP)
|
||||
goto out_good;
|
||||
|
||||
goto again;
|
||||
}
|
||||
case NEXTHDR_HOP:
|
||||
|
|
@ -444,9 +449,19 @@ ip_proto_again:
|
|||
}
|
||||
case IPPROTO_IPIP:
|
||||
proto = htons(ETH_P_IP);
|
||||
|
||||
key_control->encapsulation = 1;
|
||||
if (flags & FLOW_DISSECTOR_F_STOP_AT_ENCAP)
|
||||
goto out_good;
|
||||
|
||||
goto ip;
|
||||
case IPPROTO_IPV6:
|
||||
proto = htons(ETH_P_IPV6);
|
||||
|
||||
key_control->encapsulation = 1;
|
||||
if (flags & FLOW_DISSECTOR_F_STOP_AT_ENCAP)
|
||||
goto out_good;
|
||||
|
||||
goto ipv6;
|
||||
case IPPROTO_MPLS:
|
||||
proto = htons(ETH_P_MPLS_UC);
|
||||
|
|
|
|||
Loading…
Reference in a new issue