From owner-freebsd-net Sat Jan 20 13:20:41 2001 Delivered-To: freebsd-net@freebsd.org Received: from csunb0.leeds.ac.uk (csunb0.leeds.ac.uk [129.11.144.2]) by hub.freebsd.org (Postfix) with SMTP id AFF0737B699 for ; Sat, 20 Jan 2001 13:20:17 -0800 (PST) Received: from cslin.leeds.ac.uk (csunc0.leeds.ac.uk [129.11.144.3]) by csunb0.leeds.ac.uk (8.6.12/8.6.12) with ESMTP id VAA15465; Sat, 20 Jan 2001 21:05:14 GMT Received: from cslin-gps.comp (cslin-gps [129.11.144.9]) by cslin.leeds.ac.uk (8.9.3+Sun/) with ESMTP id VAA05009; Sat, 20 Jan 2001 21:05:15 GMT Date: Sat, 20 Jan 2001 21:05:15 +0000 From: Ben Smithurst To: Garrett Wollman Cc: freebsd-net@FreeBSD.ORG Subject: Re: manual page review: connect(2) EAGAIN error Message-ID: <20010120210514.A30733@comp.leeds.ac.uk> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200101191557.KAA10198@khavrinen.lcs.mit.edu> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Garrett Wollman wrote: > < 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