Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jan 2001 21:05:15 +0000
From:      Ben Smithurst <csxbcs@comp.leeds.ac.uk>
To:        Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: manual page review: connect(2) EAGAIN error
Message-ID:  <20010120210514.A30733@comp.leeds.ac.uk>
In-Reply-To: <200101191557.KAA10198@khavrinen.lcs.mit.edu>
References:  <20010118113453.A25127@comp.leeds.ac.uk> <200101181543.KAA29005@khavrinen.lcs.mit.edu> <20010119101915.B16961@comp.leeds.ac.uk> <200101191557.KAA10198@khavrinen.lcs.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Garrett Wollman wrote:

> <<On Fri, 19 Jan 2001 10:19:15 +0000, Ben Smithurst <csxbcs@comp.leeds.ac.uk> said:
> 
>> +.It Bq Er EAGAIN
>> +A resource was temporarily unavailable when connecting a socket in
>> +non-blocking mode.
>> +This could indicate there are no port numbers available for use when a port
>> +number is being chosen automatically.
>> +Increasing the
>> +.Va net.inet.ip.portrange.last
>> +.Xr sysctl 8
>> +variable (which defaults to 5000) may help this problem.
> 
>> Any better?
> 
> No -- if the code actually implements that, it's wrong.

Fix the damn code then, I'm just a docs committer (in theory).  And the code
certainly does seem to do this, check in_pcb.c:


	if (first > last) {
		/*
		 * counting down
		 */
		count = first - last;

		do {
			if (count-- < 0) {      /* completely used? */
				/*
				 * Undo any address bind that may have
				 * occurred above.
				 */
				inp->inp_laddr.s_addr = INADDR_ANY;
				return (EAGAIN);
			}

			...

What *should* it return?

-- 
Ben Smithurst / csxbcs@comp.leeds.ac.uk / ben@FreeBSD.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010120210514.A30733>