raw_disconnect() now disconnects but does not detach the raw pcb. As a

result, raw_uabort() now needs to call raw_detach() directly.  As
raw_uabort() is never called, and raw_disconnect() is probably not ever
actually called in practice, this is likely not a functional change, but
improves congruence between protocols, and avoids a NULL raw cb pointer
after disconnect, which could result in a panic.

MFC after:	1 month
This commit is contained in:
Robert Watson 2006-06-02 08:27:15 +00:00
parent ad3a630f7e
commit 4421f50dbc
2 changed files with 2 additions and 3 deletions

View File

@ -113,7 +113,7 @@ raw_detach(rp)
}
/*
* Disconnect and possibly release resources.
* Disconnect raw socket.
*/
void
raw_disconnect(rp)
@ -125,8 +125,6 @@ raw_disconnect(rp)
m_freem(dtom(rp->rcb_faddr));
rp->rcb_faddr = 0;
#endif
if (rp->rcb_socket->so_state & SS_NOFDREF)
raw_detach(rp);
}
#ifdef notdef

View File

@ -146,6 +146,7 @@ raw_uabort(struct socket *so)
KASSERT(rp != NULL, ("raw_uabort: rp == NULL"));
raw_disconnect(rp);
soisdisconnected(so);
raw_detach(rp);
}
/* pru_accept is EOPNOTSUPP */