OSDN Git Service

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)
committerIliyan Malchev <malchev@google.com>
Mon, 23 May 2011 22:44:01 +0000 (15:44 -0700)
commit2c3c5fafd215820e756676e9f46e8eb9c904338b
treed2f240ebd5a863ca32846b0c6efeebda34c561e0
parente278f1a72459fa39ac1a8497877191a55fad329f
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