aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorTom Herbert <tom@herbertland.com>2015-09-01 12:24:27 -0400
committerDavid S. Miller <davem@davemloft.net>2015-09-01 18:06:22 -0400
commitcd79a2382aa5dcefa6e21a7c59bb1bb19e53b74d (patch)
treec252b8dd90eddc8d635356e8b394bd455cac51c0 /net/core
parenta6e544b0a88b53114bfa5a57e21b7be7a8dfc9d0 (diff)
flow_dissector: Add flags argument to skb_flow_dissector functions
The flags argument will allow control of the dissection process (for instance whether to parse beyond L3). Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/flow_dissector.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 22f3d768b459..c3d9807cb34e 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -121,7 +121,8 @@ EXPORT_SYMBOL(__skb_flow_get_ports);
121bool __skb_flow_dissect(const struct sk_buff *skb, 121bool __skb_flow_dissect(const struct sk_buff *skb,
122 struct flow_dissector *flow_dissector, 122 struct flow_dissector *flow_dissector,
123 void *target_container, 123 void *target_container,
124 void *data, __be16 proto, int nhoff, int hlen) 124 void *data, __be16 proto, int nhoff, int hlen,
125 unsigned int flags)
125{ 126{
126 struct flow_dissector_key_control *key_control; 127 struct flow_dissector_key_control *key_control;
127 struct flow_dissector_key_basic *key_basic; 128 struct flow_dissector_key_basic *key_basic;
@@ -556,7 +557,7 @@ EXPORT_SYMBOL(flow_hash_from_keys);
556static inline u32 ___skb_get_hash(const struct sk_buff *skb, 557static inline u32 ___skb_get_hash(const struct sk_buff *skb,
557 struct flow_keys *keys, u32 keyval) 558 struct flow_keys *keys, u32 keyval)
558{ 559{
559 if (!skb_flow_dissect_flow_keys(skb, keys)) 560 if (!skb_flow_dissect_flow_keys(skb, keys, 0))
560 return 0; 561 return 0;
561 562
562 return __flow_hash_from_keys(keys, keyval); 563 return __flow_hash_from_keys(keys, keyval);
@@ -726,7 +727,7 @@ u32 skb_get_poff(const struct sk_buff *skb)
726{ 727{
727 struct flow_keys keys; 728 struct flow_keys keys;
728 729
729 if (!skb_flow_dissect_flow_keys(skb, &keys)) 730 if (!skb_flow_dissect_flow_keys(skb, &keys, 0))
730 return 0; 731 return 0;
731 732
732 return __skb_get_poff(skb, skb->data, &keys, skb_headlen(skb)); 733 return __skb_get_poff(skb, skb->data, &keys, skb_headlen(skb));