netfilter: nf_tables: Add synproxy support
Add synproxy support for nf_tables. This behaves like the iptables synproxy target but it is structured in a way that allows us to propose improvements in the future. Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
6f7b841bc9
commit
ad49d86e07
7 changed files with 325 additions and 0 deletions
|
|
@ -9,6 +9,10 @@
|
|||
#define NF_SYNPROXY_OPT_SACK_PERM 0x04
|
||||
#define NF_SYNPROXY_OPT_TIMESTAMP 0x08
|
||||
#define NF_SYNPROXY_OPT_ECN 0x10
|
||||
#define NF_SYNPROXY_OPT_MASK (NF_SYNPROXY_OPT_MSS | \
|
||||
NF_SYNPROXY_OPT_WSCALE | \
|
||||
NF_SYNPROXY_OPT_SACK_PERM | \
|
||||
NF_SYNPROXY_OPT_TIMESTAMP)
|
||||
|
||||
struct nf_synproxy_info {
|
||||
__u8 options;
|
||||
|
|
|
|||
|
|
@ -1551,6 +1551,22 @@ enum nft_osf_flags {
|
|||
NFT_OSF_F_VERSION = (1 << 0),
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nft_synproxy_attributes - nf_tables synproxy expression netlink attributes
|
||||
*
|
||||
* @NFTA_SYNPROXY_MSS: mss value sent to the backend (NLA_U16)
|
||||
* @NFTA_SYNPROXY_WSCALE: wscale value sent to the backend (NLA_U8)
|
||||
* @NFTA_SYNPROXY_FLAGS: flags (NLA_U32)
|
||||
*/
|
||||
enum nft_synproxy_attributes {
|
||||
NFTA_SYNPROXY_UNSPEC,
|
||||
NFTA_SYNPROXY_MSS,
|
||||
NFTA_SYNPROXY_WSCALE,
|
||||
NFTA_SYNPROXY_FLAGS,
|
||||
__NFTA_SYNPROXY_MAX,
|
||||
};
|
||||
#define NFTA_SYNPROXY_MAX (__NFTA_SYNPROXY_MAX - 1)
|
||||
|
||||
/**
|
||||
* enum nft_device_attributes - nf_tables device netlink attributes
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue