diff options
Diffstat (limited to 'sys/net/raw_usrreq.c')
-rw-r--r-- | sys/net/raw_usrreq.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/net/raw_usrreq.c b/sys/net/raw_usrreq.c index 33991a3..5a7449a 100644 --- a/sys/net/raw_usrreq.c +++ b/sys/net/raw_usrreq.c @@ -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); |