]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
tcp: fix ipv4 mapped request socks
authorEric Dumazet <edumazet@google.com>
Wed, 25 Mar 2015 04:45:56 +0000 (21:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Mar 2015 04:57:48 +0000 (00:57 -0400)
commit0144a81cccf7532bead90f0542f517bd028d3b3c
treeee5dd135f364e5111388180183f9a4d4918b3ecb
parentd631b94e7a15277858ec5f88d674d93080506999
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>
net/ipv4/syncookies.c
net/ipv4/tcp_input.c
net/ipv4/tcp_ipv4.c
net/ipv6/syncookies.c
net/ipv6/tcp_ipv6.c