diff options
author | emax <emax@FreeBSD.org> | 2007-08-23 16:55:22 +0000 |
---|---|---|
committer | emax <emax@FreeBSD.org> | 2007-08-23 16:55:22 +0000 |
commit | e04fc3e9d0e19d0c5ff625655007533dfcf608af (patch) | |
tree | 84b6612bfc2b7fd9076885e2ae70a0c8e379ba05 /sys | |
parent | 003205bcb26c5c15a3804bbfe630ef4a7e958a1c (diff) | |
download | FreeBSD-src-e04fc3e9d0e19d0c5ff625655007533dfcf608af.zip FreeBSD-src-e04fc3e9d0e19d0c5ff625655007533dfcf608af.tar.gz |
Return EADDRNOTAVAIL instead of EDESTADDRREQ error when
listen(2) is called on improperly bound socket.
Suggested by: Iain Hibbert
Approved by: re (kensmith)
MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c | 2 | ||||
-rw-r--r-- | sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c index ee0886f..7f21bfe 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c @@ -2374,7 +2374,7 @@ ng_btsocket_l2cap_listen(struct socket *so, int backlog, struct thread *td) goto out; } if (pcb->psm == 0) { - error = EDESTADDRREQ; + error = EADDRNOTAVAIL; goto out; } solisten_proto(so, backlog); diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c index 46668ae..066885a 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c @@ -805,7 +805,7 @@ ng_btsocket_rfcomm_listen(struct socket *so, int backlog, 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. |