Commit f286586d authored by Máté Eckl's avatar Máté Eckl Committed by Pablo Neira Ayuso

netfilter: nft_tproxy: Move nf_tproxy_assign_sock() to nf_tproxy.h

This function is also necessary to implement nft tproxy support

Fixes: 45ca4e0c ("netfilter: Libify xt_TPROXY")
Signed-off-by: default avatarMáté Eckl <ecklm94@gmail.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent e97d9404
...@@ -17,6 +17,14 @@ static inline bool nf_tproxy_sk_is_transparent(struct sock *sk) ...@@ -17,6 +17,14 @@ static inline bool nf_tproxy_sk_is_transparent(struct sock *sk)
return false; 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); __be32 nf_tproxy_laddr4(struct sk_buff *skb, __be32 user_laddr, __be32 daddr);
/** /**
......
...@@ -36,15 +36,6 @@ ...@@ -36,15 +36,6 @@
#include <net/netfilter/nf_tproxy.h> #include <net/netfilter/nf_tproxy.h>
#include <linux/netfilter/xt_TPROXY.h> #include <linux/netfilter/xt_TPROXY.h>
/* assign a socket to the skb -- consumes sk */
static void
nf_tproxy_assign_sock(struct sk_buff *skb, struct sock *sk)
{
skb_orphan(skb);
skb->sk = sk;
skb->destructor = sock_edemux;
}
static unsigned int static unsigned int
tproxy_tg4(struct net *net, struct sk_buff *skb, __be32 laddr, __be16 lport, tproxy_tg4(struct net *net, struct sk_buff *skb, __be32 laddr, __be16 lport,
u_int32_t mark_mask, u_int32_t mark_value) u_int32_t mark_mask, u_int32_t mark_value)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment