summaryrefslogtreecommitdiff
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2011-03-10 20:24:12 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:38:31 -0800
commitc0b779e1c5220b812c5690727fb646b731101fff (patch)
tree626e2c338338d797854490a35f646b29b421b477 /net/ipv4/devinet.c
parentfafc4cc382454fbf40af9263e64473ae4d955b0c (diff)
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>
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 8d40ca19326b..80554bcfd979 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -916,8 +916,7 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg)
}
break;
case SIOCKILLADDR: /* Nuke all connections on this address */
- ret = 0;
- tcp_v4_nuke_addr(sin->sin_addr.s_addr);
+ ret = tcp_nuke_addr(net, (struct sockaddr *) sin);
break;
}
done: