summaryrefslogtreecommitdiff
path: root/net/ethernet
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@google.com>2019-04-22 08:55:46 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2019-04-23 18:36:34 +0200
commit3cbf4ffba5eeec60f82868a5facc1962d8a44d00 (patch)
treeef319394a3273b9c2091fc82e56d79dc03fb5469 /net/ethernet
parent7b8a1304323b35bbf060e0d29691031056836b73 (diff)
net: plumb network namespace into __skb_flow_dissect
This new argument will be used in the next patches for the eth_get_headlen use case. eth_get_headlen calls flow dissector with only data (without skb) so there is currently no way to pull attached BPF flow dissector program. With this new argument, we can amend the callers to explicitly pass network namespace so we can use attached BPF program. Signed-off-by: Stanislav Fomichev <sdf@google.com> Reviewed-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'net/ethernet')
-rw-r--r--net/ethernet/eth.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index f7a3d7a171c7..1e439549c419 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -136,8 +136,9 @@ u32 eth_get_headlen(void *data, unsigned int len)
return len;
/* parse any remaining L2/L3 headers, check for L4 */
- if (!skb_flow_dissect_flow_keys_basic(NULL, &keys, data, eth->h_proto,
- sizeof(*eth), len, flags))
+ if (!skb_flow_dissect_flow_keys_basic(NULL, NULL, &keys, data,
+ eth->h_proto, sizeof(*eth),
+ len, flags))
return max_t(u32, keys.control.thoff, sizeof(*eth));
/* parse for any L4 headers */