netmap support for nftables
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: allow up to 64 bytes in the set element data areainclude/ net/ | +30 | 0 replies | |
| 2/5 | netfilter: nft_nat: return EOPNOTSUPP if type or flags are not supportednet/ | +2 | 0 replies | |
| 3/5 | netfilter: nft_nat: set flags from initialization pathnet/ | +6 | 0 replies | |
| 4/5 | netfilter: nft_nat: add helper function to set up NAT address and protocolnet/ | +34 | 0 replies | |
| 5/5 | netfilter: nft_nat: add netmap supportinclude/ net/ | +48 | 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] netmap support for nftables
Hi,
The following patchset adds netmap support for nftables.
Patch #1 Remove the 128-bit limitation on the set element data area.
Rise it up to 64 bytes maximum.
Patch #2 Return EOPNOTSUPP in case NAT type or flags are not supported.
Patch #3 Initialize NAT flags from control plane.
Patch #4 Add helper functions to set up NAT address and protocol
Patch #5 Add netmap support.
The following example enables source netmap using the 192.168.3.0/24 network address:
table ip x {
chain y {
type nat hook postrouting priority srcnat; policy accept;
snat ip prefix to 192.168.3.0/24
}}
You can also combine it with maps:
table ip x {
chain y {
type nat hook postrouting priority srcnat; policy accept;
snat ip prefix to ip saddr map { 192.168.2.0/24 : 192.168.3.0/24 }
}}
Comments welcome.
Thanks.
Pablo Neira Ayuso (5):
netfilter: nf_tables: allow up to 64 bytes in the set element data area
netfilter: nft_nat: return EOPNOTSUPP if type or flags are not supported
netfilter: nft_nat: set flags from initialization path
netfilter: nft_nat: add helper function to set up NAT address and protocol
netfilter: nft_nat: add netmap support
include/net/netfilter/nf_tables.h | 4 + include/uapi/linux/netfilter/nf_nat.h | 4 +- net/netfilter/nf_tables_api.c | 38 ++++++--- net/netfilter/nft_nat.c | 110 ++++++++++++++++++++------ 4 files changed, 117 insertions(+), 39 deletions(-)
--
2.20.1