mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-16 21:34:10 +00:00
o In rip_disconnect() do not call rip_abort(), just mark a socket
as not connected. In soclose() case rip_detach() will kill inpcb for us later. It makes rawconnect regression test do not panic a system. Reviewed by: rwatson X-MFC after: with all 1th April inpcb changes
This commit is contained in:
parent
df2e45f7c2
commit
eb16472f74
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=158588
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue