diff options
author | Petar Penkov <ppenkov@google.com> | 2018-09-14 16:46:18 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-09-14 21:04:33 +0200 |
commit | d58e468b1112dcd1d5193c0a89ff9f98b5a3e8b9 (patch) | |
tree | aca881df342a9ac9bcef834f5fc2621f5a095403 /include/net/net_namespace.h | |
parent | net/core/filter: fix unused-variable warning (diff) | |
download | linux-d58e468b1112dcd1d5193c0a89ff9f98b5a3e8b9.tar.xz linux-d58e468b1112dcd1d5193c0a89ff9f98b5a3e8b9.zip |
flow_dissector: implements flow dissector BPF hook
Adds a hook for programs of type BPF_PROG_TYPE_FLOW_DISSECTOR and
attach type BPF_FLOW_DISSECTOR that is executed in the flow dissector
path. The BPF program is per-network namespace.
Signed-off-by: Petar Penkov <ppenkov@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r-- | include/net/net_namespace.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 9b5fdc50519a..99d4148e0f90 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h @@ -43,6 +43,7 @@ struct ctl_table_header; struct net_generic; struct uevent_sock; struct netns_ipvs; +struct bpf_prog; #define NETDEV_HASHBITS 8 @@ -145,6 +146,8 @@ struct net { #endif struct net_generic __rcu *gen; + struct bpf_prog __rcu *flow_dissector_prog; + /* Note : following structs are cache line aligned */ #ifdef CONFIG_XFRM struct netns_xfrm xfrm; |