Correct an assertion in raw_uattach(): this is a library call that other
protocols invoke after allocating a PCB, so so_pcb should be non-NULL. It is only used by the two IPSEC implementations, so I didn't hit it in my testing. Reported by: pjd MFC after: 3 months
This commit is contained in:
parent
582954da16
commit
9d20951479
@ -155,7 +155,12 @@ raw_uattach(struct socket *so, int proto, struct thread *td)
|
||||
{
|
||||
int error;
|
||||
|
||||
KASSERT(sotorawcb(so) == NULL, ("raw_uattach: rp != NULL"));
|
||||
/*
|
||||
* Implementors of raw sockets will already have allocated the PCB,
|
||||
* so it must be non-NULL here.
|
||||
*/
|
||||
KASSERT(sotorawcb(so) != NULL, ("raw_uattach: so_pcb == NULL"));
|
||||
|
||||
if (td && (error = suser(td)) != 0)
|
||||
return error;
|
||||
return raw_attach(so, proto);
|
||||
|
Loading…
Reference in New Issue
Block a user