From 550b151850d9dd44e99bf00fbf43ca9a404e07f7 Mon Sep 17 00:00:00 2001 From: Wes Peters Date: Tue, 23 Jan 2001 07:27:56 +0000 Subject: [PATCH] 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 Reviewed by: Garrett Wollman --- sys/netinet/in_pcb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index eccc778b96f..5e3383be6f0 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)