hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/net/ipv4/netfilter/nf_reject_ipv4.c
....@@ -112,7 +112,8 @@
112112 }
113113
114114 /* Send RST reply */
115
-void nf_send_reset(struct net *net, struct sk_buff *oldskb, int hook)
115
+void nf_send_reset(struct net *net, struct sock *sk, struct sk_buff *oldskb,
116
+ int hook)
116117 {
117118 struct net_device *br_indev __maybe_unused;
118119 struct sk_buff *nskb;
....@@ -144,8 +145,7 @@
144145 niph = nf_reject_iphdr_put(nskb, oldskb, IPPROTO_TCP,
145146 ip4_dst_hoplimit(skb_dst(nskb)));
146147 nf_reject_ip_tcphdr_put(nskb, oldskb, oth);
147
-
148
- if (ip_route_me_harder(net, nskb->sk, nskb, RTN_UNSPEC))
148
+ if (ip_route_me_harder(net, sk, nskb, RTN_UNSPEC))
149149 goto free_nskb;
150150
151151 niph = ip_hdr(nskb);