diff options
author | Máté Eckl <ecklm94@gmail.com> | 2018-06-18 16:12:52 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-07-16 18:51:48 +0300 |
commit | f286586df68e7733a8e651098401f139dc2e17f4 (patch) | |
tree | 8cd74cbc238a279aae7e8e85300530977121a6a2 /include/net/netfilter/nf_tproxy.h | |
parent | e97d9404d5e8aea1f91f4c00dbe7854008f3a1e1 (diff) | |
download | linux-f286586df68e7733a8e651098401f139dc2e17f4.tar.xz |
netfilter: nft_tproxy: Move nf_tproxy_assign_sock() to nf_tproxy.h
This function is also necessary to implement nft tproxy support
Fixes: 45ca4e0cf273 ("netfilter: Libify xt_TPROXY")
Signed-off-by: Máté Eckl <ecklm94@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netfilter/nf_tproxy.h')
-rw-r--r-- | include/net/netfilter/nf_tproxy.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_tproxy.h b/include/net/netfilter/nf_tproxy.h index 9754a50ecde9..d5a80888cbe4 100644 --- a/include/net/netfilter/nf_tproxy.h +++ b/include/net/netfilter/nf_tproxy.h @@ -17,6 +17,14 @@ static inline bool nf_tproxy_sk_is_transparent(struct sock *sk) return false; } +/* assign a socket to the skb -- consumes sk */ +static inline void nf_tproxy_assign_sock(struct sk_buff *skb, struct sock *sk) +{ + skb_orphan(skb); + skb->sk = sk; + skb->destructor = sock_edemux; +} + __be32 nf_tproxy_laddr4(struct sk_buff *skb, __be32 user_laddr, __be32 daddr); /** |