mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 14:26:03 -04: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
1 changed files with 2 additions and 2 deletions
|
|
@ -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 a new issue