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:
parent
08f825912f
commit
550b151850
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=71415
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user