aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 33f5ff068c79..a3f72d7fc06c 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -623,6 +623,7 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb)
623 arg.iov[0].iov_base = (unsigned char *)&rep; 623 arg.iov[0].iov_base = (unsigned char *)&rep;
624 arg.iov[0].iov_len = sizeof(rep.th); 624 arg.iov[0].iov_len = sizeof(rep.th);
625 625
626 net = sk ? sock_net(sk) : dev_net(skb_dst(skb)->dev);
626#ifdef CONFIG_TCP_MD5SIG 627#ifdef CONFIG_TCP_MD5SIG
627 hash_location = tcp_parse_md5sig_option(th); 628 hash_location = tcp_parse_md5sig_option(th);
628 if (!sk && hash_location) { 629 if (!sk && hash_location) {
@@ -633,7 +634,7 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb)
633 * Incoming packet is checked with md5 hash with finding key, 634 * Incoming packet is checked with md5 hash with finding key,
634 * no RST generated if md5 hash doesn't match. 635 * no RST generated if md5 hash doesn't match.
635 */ 636 */
636 sk1 = __inet_lookup_listener(dev_net(skb_dst(skb)->dev), 637 sk1 = __inet_lookup_listener(net,
637 &tcp_hashinfo, ip_hdr(skb)->saddr, 638 &tcp_hashinfo, ip_hdr(skb)->saddr,
638 th->source, ip_hdr(skb)->daddr, 639 th->source, ip_hdr(skb)->daddr,
639 ntohs(th->source), inet_iif(skb)); 640 ntohs(th->source), inet_iif(skb));
@@ -681,7 +682,6 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb)
681 if (sk) 682 if (sk)
682 arg.bound_dev_if = sk->sk_bound_dev_if; 683 arg.bound_dev_if = sk->sk_bound_dev_if;
683 684
684 net = dev_net(skb_dst(skb)->dev);
685 arg.tos = ip_hdr(skb)->tos; 685 arg.tos = ip_hdr(skb)->tos;
686 ip_send_unicast_reply(net, skb, &TCP_SKB_CB(skb)->header.h4.opt, 686 ip_send_unicast_reply(net, skb, &TCP_SKB_CB(skb)->header.h4.opt,
687 ip_hdr(skb)->saddr, ip_hdr(skb)->daddr, 687 ip_hdr(skb)->saddr, ip_hdr(skb)->daddr,