tcp: add ipv6_addr_v4mapped_loopback() helper
authorEric Dumazet <edumazet@google.com>
Tue, 1 Oct 2019 17:49:06 +0000 (10:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Oct 2019 20:07:53 +0000 (13:07 -0700)
commitbe2644aac3e1db02d09f45d56206bbdafca582a2
tree36976d22af2d893c45cfb0e06cf651fcb5cc8028
parent5be5515a8ea198de6eb204a0ff25faf98b8ff719
tcp: add ipv6_addr_v4mapped_loopback() helper

tcp_twsk_unique() has a hard coded assumption about ipv4 loopback
being 127/8

Lets instead use the standard ipv4_is_loopback() method,
in a new ipv6_addr_v4mapped_loopback() helper.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ipv6.h
net/ipv4/tcp_ipv4.c