netfilter: use actual socket sk for REJECT action
[ Upstream commit 04295878beac396dae47ba93141cae0d9386e7ef ] True to the message of commit v5.10-rc1-105-g46d6c5ae953c, _do_ actually make use of state->sk when possible, such as in the REJECT modules. Reported-by: Minqiang Chen <ptpt52@gmail.com> Cc: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Stable-dep-of: 28427f368f0e ("netfilter: nft_exthdr: Fix non-linear header modification") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
2d9ea86f3c
commit
858ca19216
@@ -8,8 +8,8 @@
|
||||
#include <net/netfilter/nf_reject.h>
|
||||
|
||||
void nf_send_unreach(struct sk_buff *skb_in, int code, int hook);
|
||||
void nf_send_reset(struct net *net, struct sk_buff *oldskb, int hook);
|
||||
|
||||
void nf_send_reset(struct net *net, struct sock *, struct sk_buff *oldskb,
|
||||
int hook);
|
||||
const struct tcphdr *nf_reject_ip_tcphdr_get(struct sk_buff *oldskb,
|
||||
struct tcphdr *_oth, int hook);
|
||||
struct iphdr *nf_reject_iphdr_put(struct sk_buff *nskb,
|
||||
|
@@ -7,9 +7,8 @@
|
||||
|
||||
void nf_send_unreach6(struct net *net, struct sk_buff *skb_in, unsigned char code,
|
||||
unsigned int hooknum);
|
||||
|
||||
void nf_send_reset6(struct net *net, struct sk_buff *oldskb, int hook);
|
||||
|
||||
void nf_send_reset6(struct net *net, struct sock *sk, struct sk_buff *oldskb,
|
||||
int hook);
|
||||
const struct tcphdr *nf_reject_ip6_tcphdr_get(struct sk_buff *oldskb,
|
||||
struct tcphdr *otcph,
|
||||
unsigned int *otcplen, int hook);
|
||||
|
Reference in New Issue
Block a user