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:
parent
ad3a630f7e
commit
4421f50dbc
@ -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
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user