MFC:
Return EADDRNOTAVAIL instead of EDESTADDRREQ error when listen(2) is called on improperly bound socket.
This commit is contained in:
parent
99ff582459
commit
d0e06d1dd8
@ -2424,7 +2424,7 @@ ng_btsocket_l2cap_listen(struct socket *so, struct thread *td)
|
||||
goto out;
|
||||
}
|
||||
if (pcb->psm == 0) {
|
||||
error = EDESTADDRREQ;
|
||||
error = EADDRNOTAVAIL;
|
||||
goto out;
|
||||
}
|
||||
solisten_proto(so);
|
||||
|
@ -805,7 +805,7 @@ ng_btsocket_rfcomm_listen(struct socket *so, struct thread *td)
|
||||
if (pcb == NULL)
|
||||
return (EINVAL);
|
||||
if (pcb->channel < 1 || pcb->channel > 30)
|
||||
return (EDESTADDRREQ);
|
||||
return (EADDRNOTAVAIL);
|
||||
|
||||
/*
|
||||
* XXX FIXME - This is FUBAR. socreate() will call soalloc(1), i.e.
|
||||
|
Loading…
x
Reference in New Issue
Block a user