mirror of
https://github.com/opnsense/src.git
synced 2026-02-20 00:11:07 -05:00
rpc: Convert an SOLISTENING check to an assertion
Per the comment, this socket should always be a listening socket. MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
40fcdb9366
commit
7fabaac221
1 changed files with 3 additions and 5 deletions
|
|
@ -328,11 +328,9 @@ svc_vc_accept(struct socket *head, struct socket **sop)
|
|||
int error = 0;
|
||||
short nbio;
|
||||
|
||||
/* XXXGL: shouldn't that be an assertion? */
|
||||
if (!SOLISTENING(head)) {
|
||||
error = EINVAL;
|
||||
goto done;
|
||||
}
|
||||
KASSERT(SOLISTENING(head),
|
||||
("%s: socket %p is not listening", __func__, head));
|
||||
|
||||
#ifdef MAC
|
||||
error = mac_socket_check_accept(curthread->td_ucred, head);
|
||||
if (error != 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue