diff options
author | Robert Love <rlove@google.com> | 2008-05-12 17:08:29 -0400 |
---|---|---|
committer | Arve Hjønnevåg <arve@android.com> | 2009-04-07 16:43:12 -0700 |
commit | 2df5996350da51bcdee798c00ae1f2415fd9ad20 (patch) | |
tree | ebdc507e56bb5c6c842e0b7afd8220f04c87528e /include | |
parent | 99518ba0de32a820131f5b55f92740213acdd369 (diff) |
net: socket ioctl to reset connections matching local address
Introduce a new socket ioctl, SIOCKILLADDR, that nukes all sockets
bound to the same local address. This is useful in situations with
dynamic IPs, to kill stuck connections.
Signed-off-by: Brian Swetland <swetland@google.com>
net: fix tcp_v4_nuke_addr
Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sockios.h | 1 | ||||
-rw-r--r-- | include/net/tcp.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sockios.h b/include/linux/sockios.h index abef7596655a..16f6533e3a92 100644 --- a/include/linux/sockios.h +++ b/include/linux/sockios.h @@ -65,6 +65,7 @@ #define SIOCDIFADDR 0x8936 /* delete PA address */ #define SIOCSIFHWBROADCAST 0x8937 /* set hardware broadcast addr */ #define SIOCGIFCOUNT 0x8938 /* get number of devices */ +#define SIOCKILLADDR 0x8939 /* kill sockets with this local addr */ #define SIOCGIFBR 0x8940 /* Bridging support */ #define SIOCSIFBR 0x8941 /* Set bridging options */ diff --git a/include/net/tcp.h b/include/net/tcp.h index 218235de8963..01718823ab42 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1365,6 +1365,8 @@ extern struct sk_buff **tcp4_gro_receive(struct sk_buff **head, extern int tcp_gro_complete(struct sk_buff *skb); extern int tcp4_gro_complete(struct sk_buff *skb); +extern void tcp_v4_nuke_addr(__u32 saddr); + #ifdef CONFIG_PROC_FS extern int tcp4_proc_init(void); extern void tcp4_proc_exit(void); |