summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwes <wes@FreeBSD.org>2001-01-23 07:27:56 +0000
committerwes <wes@FreeBSD.org>2001-01-23 07:27:56 +0000
commiteeda0df2a3ff394111987f3cd5edfd90707323b1 (patch)
tree012d173157cfc42cb1cfc4b76febc6ce2e624ae7
parent2d9096c43d1c48b7e623d68946ea3edaf171e1e7 (diff)
downloadFreeBSD-src-eeda0df2a3ff394111987f3cd5edfd90707323b1.zip
FreeBSD-src-eeda0df2a3ff394111987f3cd5edfd90707323b1.tar.gz
When attempting to bind to an ephemeral port, if no such port is
available, the error return should be EADDRNOTAVAIL rather than EAGAIN. PR: 14181 Submitted by: Dima Dorfman <dima@unixfreak.org> Reviewed by: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
-rw-r--r--sys/netinet/in_pcb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index eccc778..5e3383be 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -313,7 +313,7 @@ in_pcbbind(inp, nam, p)
* occurred above.
*/
inp->inp_laddr.s_addr = INADDR_ANY;
- return (EAGAIN);
+ return (EADDRNOTAVAIL);
}
--*lastport;
if (*lastport > first || *lastport < last)
@@ -334,7 +334,7 @@ in_pcbbind(inp, nam, p)
* occurred above.
*/
inp->inp_laddr.s_addr = INADDR_ANY;
- return (EAGAIN);
+ return (EADDRNOTAVAIL);
}
++*lastport;
if (*lastport < first || *lastport > last)
OpenPOWER on IntegriCloud