From owner-freebsd-bugs Sat Feb 13 02:30:05 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA20664 for freebsd-bugs-outgoing; Sat, 13 Feb 1999 02:30:05 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA20649 for ; Sat, 13 Feb 1999 02:30:03 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.2/8.9.2) id CAA16769; Sat, 13 Feb 1999 02:30:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Date: Sat, 13 Feb 1999 02:30:02 -0800 (PST) Message-Id: <199902131030.CAA16769@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.ORG From: Matthew Dillon Subject: Re: kern/10028: TCP problem binding port - address already in use Reply-To: Matthew Dillon Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/10028; it has been noted by GNATS. From: Matthew Dillon To: David Hedley Cc: Bill Fenner , freebsd-gnats-submit@FreeBSD.ORG Subject: Re: kern/10028: TCP problem binding port - address already in use Date: Sat, 13 Feb 1999 02:23:01 -0800 (PST) The error message is correct. When there are still connections attached to the bound port and the program listening on the port goes away, the kernel does not allow reattaching to the port until a timeout - which I think should be around 2 minutes. You can tell the kernel to blow it off and allow reattachments with the SO_REUSEADDR socket opt. int on = 1; setsockopt(lfd, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on)); listen(lfd, ... ); -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message