1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-06 13:09:50 +00:00

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>
This commit is contained in:
Wes Peters 2001-01-23 07:27:56 +00:00
parent 08f825912f
commit 550b151850
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=71415

View File

@ -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)