summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorEric Dumazet2015-03-25 05:45:56 +0100
committerDavid S. Miller2015-03-25 05:57:48 +0100
commit0144a81cccf7532bead90f0542f517bd028d3b3c (patch)
treeee5dd135f364e5111388180183f9a4d4918b3ecb /net/ipv4/tcp_input.c
parentvirtio: change comment in transmit (diff)
downloadkernel-qcow2-linux-0144a81cccf7532bead90f0542f517bd028d3b3c.tar.gz
kernel-qcow2-linux-0144a81cccf7532bead90f0542f517bd028d3b3c.tar.xz
kernel-qcow2-linux-0144a81cccf7532bead90f0542f517bd028d3b3c.zip
tcp: fix ipv4 mapped request socks
ss should display ipv4 mapped request sockets like this : tcp SYN-RECV 0 0 ::ffff:192.168.0.1:8080 ::ffff:192.0.2.1:35261 and not like this : tcp SYN-RECV 0 0 192.168.0.1:8080 192.0.2.1:35261 We should init ireq->ireq_family based on listener sk_family, not the actual protocol carried by SYN packet. This means we can set ireq_family in inet_reqsk_alloc() Fixes: 3f66b083a5b7 ("inet: introduce ireq_family") Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 95caea707f54..023196f7ec37 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5980,7 +5980,7 @@ struct request_sock *inet_reqsk_alloc(const struct request_sock_ops *ops,
atomic64_set(&ireq->ir_cookie, 0);
ireq->ireq_state = TCP_NEW_SYN_RECV;
write_pnet(&ireq->ireq_net, sock_net(sk_listener));
-
+ ireq->ireq_family = sk_listener->sk_family;
}
return req;