net: Support nuking IPv6 sockets as well as IPv4.
authorLorenzo Colitti <lorenzo@google.com>
Fri, 11 Mar 2011 04:24:12 +0000 (20:24 -0800)
committerLorenzo Colitti <lorenzo@google.com>
Sat, 12 Mar 2011 00:40:27 +0000 (16:40 -0800)
commita0b2620b8eb2026e4e400f8bffda4e95f15f4e07
treedc2140d25a8e69c2e2b3b3ef0bd3281f95889910
parent5c58e03b81e1ac1231f1ae68e4611c31f428f2f9
net: Support nuking IPv6 sockets as well as IPv4.

On Linux, when an interface goes down all its IPv6
addresses are deleted, so relying on knowing the previous
IPv6 addresses on the interface is brittle. Instead,
support nuking all sockets that are bound to IP addresses
that are not configured and up on the system. This
behaviour is triggered by specifying the unspecified
address (:: or 0.0.0.0). If an IP address is specified, the
behaviour is unchanged, except the ioctl now supports IPv6
as well as IPv4.

Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
include/net/tcp.h
net/ipv4/devinet.c
net/ipv4/tcp.c
net/ipv4/tcp_ipv4.c
net/ipv6/af_inet6.c