Hook multiple netdevices to basechain
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | netfilter: nf_tables_offload: add nft_flow_block_chain()net/ | +11 | 0 replies | |
| 2/5 | netfilter: nf_tables_offload: Pass callback list to nft_setup_cb_call()net/ | +5 | 0 replies | |
| 3/5 | netfilter: nf_tables_offload: add nft_flow_cls_offload_setup()net/ | +24 | 0 replies | |
| 4/5 | netfilter: nf_tables_offload: remove rules on unregistered device onlynet/ | +13 | 0 replies | |
| 5/5 | netfilter: nf_tables: support for multiple devices per netdev hookinclude/ include/ net/ +2 more | +272 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH nf-next 0/5] Hook multiple netdevices to basechain
Hi,
This patchset extends the netdev family to allow for hooking multiple devices to basechains, eg.
nft add table netdev x
nft add chain netdev x y { \
type filter hook ingress devices = { eth0, eth1 } priority 0\; }Hence you can apply the same policy to packet coming in from eth0 and eth1 netdevices.
1) Add nft_flow_block_chain() helper function.
2) Pass callback list to nft_setup_cb_call().
3) Add nft_flow_cls_offload_setup() helper function.
4) Iterate over list of callbacks that belongs to the netdevices that is being unregister to remove the rules from the netdevice.
This patches comes in preparation for:
5) Allow for hooking multiple devices to the same netdev basechain.
Pablo Neira Ayuso (5):
netfilter: nf_tables_offload: add nft_flow_block_chain()
netfilter: nf_tables_offload: Pass callback list to nft_setup_cb_call()
netfilter: nf_tables_offload: add nft_flow_cls_offload_setup()
netfilter: nf_tables_offload: remove rules on unregistered device only
netfilter: nf_tables: support for multiple devices per netdev hook
include/net/netfilter/nf_tables.h | 4 +- include/uapi/linux/netfilter/nf_tables.h | 2 + net/netfilter/nf_tables_api.c | 296 ++++++++++++++++++++++++------- net/netfilter/nf_tables_offload.c | 98 ++++++---- net/netfilter/nft_chain_filter.c | 45 +++-- 5 files changed, 325 insertions(+), 120 deletions(-)
Signature · 1 line
2.11.0