mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 08:02:56 +00:00
ipv4: Pass explicit daddr arg to ip_send_reply().
This eliminates an access to rt->rt_src. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1c3319fb69
commit
0a5ebb8000
3 changed files with 7 additions and 8 deletions
|
@ -651,7 +651,7 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb)
|
|||
arg.flags = (sk && inet_sk(sk)->transparent) ? IP_REPLY_ARG_NOSRCCHECK : 0;
|
||||
|
||||
net = dev_net(skb_dst(skb)->dev);
|
||||
ip_send_reply(net->ipv4.tcp_sock, skb,
|
||||
ip_send_reply(net->ipv4.tcp_sock, skb, ip_hdr(skb)->saddr,
|
||||
&arg, arg.iov[0].iov_len);
|
||||
|
||||
TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS);
|
||||
|
@ -726,7 +726,7 @@ static void tcp_v4_send_ack(struct sk_buff *skb, u32 seq, u32 ack,
|
|||
if (oif)
|
||||
arg.bound_dev_if = oif;
|
||||
|
||||
ip_send_reply(net->ipv4.tcp_sock, skb,
|
||||
ip_send_reply(net->ipv4.tcp_sock, skb, ip_hdr(skb)->saddr,
|
||||
&arg, arg.iov[0].iov_len);
|
||||
|
||||
TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue