aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMaxim Konovalov <maxim@FreeBSD.org>2006-05-15 09:28:57 +0000
committerMaxim Konovalov <maxim@FreeBSD.org>2006-05-15 09:28:57 +0000
commiteb16472f74536a8fa22f16844c44f7120cc1af0a (patch)
tree735cd0df99118efce72e0bf06adb5899f587e486 /sys
parentdf2e45f7c2eda773e7c0a6106b86f2afe96c4d2f (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/raw_ip.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 7a7890a90f41..63a6245b92cd 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -661,9 +661,19 @@ rip_abort(struct socket *so)
static int
rip_disconnect(struct socket *so)
{
+ struct inpcb *inp;
+
if ((so->so_state & SS_ISCONNECTED) == 0)
return ENOTCONN;
- rip_abort(so);
+
+ inp = sotoinpcb(so);
+ KASSERT(inp != NULL, ("rip_disconnect: inp == NULL"));
+ INP_INFO_WLOCK(&ripcbinfo);
+ INP_LOCK(inp);
+ inp->inp_faddr.s_addr = INADDR_ANY;
+ INP_UNLOCK(inp);
+ INP_INFO_WUNLOCK(&ripcbinfo);
+ so->so_state &= ~SS_ISCONNECTED;
return (0);
}