diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-03-01 13:55:14 -0500 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-03-02 14:05:27 -0500 |
| commit | 8a6bf5da1aefdafd60b73d9122c7af9fd2d7bb9c (patch) | |
| tree | 8b27863200e3aed5a718dfb9194f6cedec8fe875 /include | |
| parent | af4610c39589d839551da104f7da342d86f23ea0 (diff) | |
netfilter: nft_masq: support port range
Complete masquerading support by allowing port range selection.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/netfilter/nft_masq.h | 4 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter/nf_tables.h | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/net/netfilter/nft_masq.h b/include/net/netfilter/nft_masq.h index e2a518b60e19..a3f3c11b2526 100644 --- a/include/net/netfilter/nft_masq.h +++ b/include/net/netfilter/nft_masq.h | |||
| @@ -2,7 +2,9 @@ | |||
| 2 | #define _NFT_MASQ_H_ | 2 | #define _NFT_MASQ_H_ |
| 3 | 3 | ||
| 4 | struct nft_masq { | 4 | struct nft_masq { |
| 5 | u32 flags; | 5 | u32 flags; |
| 6 | enum nft_registers sreg_proto_min:8; | ||
| 7 | enum nft_registers sreg_proto_max:8; | ||
| 6 | }; | 8 | }; |
| 7 | 9 | ||
| 8 | extern const struct nla_policy nft_masq_policy[]; | 10 | extern const struct nla_policy nft_masq_policy[]; |
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h index b19be0a098c0..eeffde196f80 100644 --- a/include/uapi/linux/netfilter/nf_tables.h +++ b/include/uapi/linux/netfilter/nf_tables.h | |||
| @@ -951,10 +951,14 @@ enum nft_nat_attributes { | |||
| 951 | * enum nft_masq_attributes - nf_tables masquerade expression attributes | 951 | * enum nft_masq_attributes - nf_tables masquerade expression attributes |
| 952 | * | 952 | * |
| 953 | * @NFTA_MASQ_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32) | 953 | * @NFTA_MASQ_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32) |
| 954 | * @NFTA_MASQ_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers) | ||
| 955 | * @NFTA_MASQ_REG_PROTO_MAX: source register of proto range end (NLA_U32: nft_registers) | ||
| 954 | */ | 956 | */ |
| 955 | enum nft_masq_attributes { | 957 | enum nft_masq_attributes { |
| 956 | NFTA_MASQ_UNSPEC, | 958 | NFTA_MASQ_UNSPEC, |
| 957 | NFTA_MASQ_FLAGS, | 959 | NFTA_MASQ_FLAGS, |
| 960 | NFTA_MASQ_REG_PROTO_MIN, | ||
| 961 | NFTA_MASQ_REG_PROTO_MAX, | ||
| 958 | __NFTA_MASQ_MAX | 962 | __NFTA_MASQ_MAX |
| 959 | }; | 963 | }; |
| 960 | #define NFTA_MASQ_MAX (__NFTA_MASQ_MAX - 1) | 964 | #define NFTA_MASQ_MAX (__NFTA_MASQ_MAX - 1) |
