diff options
author | David S. Miller <davem@davemloft.net> | 2016-09-23 06:46:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-23 06:46:57 -0400 |
commit | d6989d4bbe6c4d1c2a76696833a07f044e85694d (patch) | |
tree | 2d9a70d0feee4d4a20568be1b39a961fa0d27d81 /include/net/netfilter | |
parent | 0364a8824c020f12e2d5e9fad963685b58f7574e (diff) | |
parent | b1f2beb87bb034bb209773807994279f90cace78 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'include/net/netfilter')
-rw-r--r-- | include/net/netfilter/nf_conntrack_synproxy.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_conntrack_synproxy.h b/include/net/netfilter/nf_conntrack_synproxy.h index 6793614e6502..e6937318546c 100644 --- a/include/net/netfilter/nf_conntrack_synproxy.h +++ b/include/net/netfilter/nf_conntrack_synproxy.h @@ -27,6 +27,20 @@ static inline struct nf_conn_synproxy *nfct_synproxy_ext_add(struct nf_conn *ct) #endif } +static inline bool nf_ct_add_synproxy(struct nf_conn *ct, + const struct nf_conn *tmpl) +{ + if (tmpl && nfct_synproxy(tmpl)) { + if (!nfct_seqadj_ext_add(ct)) + return false; + + if (!nfct_synproxy_ext_add(ct)) + return false; + } + + return true; +} + struct synproxy_stats { unsigned int syn_received; unsigned int cookie_invalid; |