From owner-freebsd-mobile Mon Jan 29 13:22:16 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from gaia.home.rdls.net (jezebel.demon.co.uk [158.152.38.143]) by hub.freebsd.org (Postfix) with ESMTP id BA72137B402 for ; Mon, 29 Jan 2001 13:21:57 -0800 (PST) Received: from rdls.net (localhost [127.0.0.1]) by gaia.home.rdls.net (8.11.1/8.11.1) with ESMTP id f0TLJrQ00384 for ; Mon, 29 Jan 2001 21:20:40 GMT (envelope-from rdls@rdls.net) Message-ID: <3A75DE78.3198F90B@rdls.net> Date: Mon, 29 Jan 2001 21:19:52 +0000 From: Richard Smith Organization: http://www.rdls.net X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.2-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Mobile Mailing List Subject: Wierd problem with dhclient and it's scripts Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Dear all, I have been using dhcp to configure my notebook, and dhclient-exit-hooks to start/restart certain resources such as apache and timed, whenever the attached network changes. I have been plagued by "dhclient: Can't bind to dhcp address: Address already in use" errors whenever the notebook is resumed, and I have just sussed out what's going on. Any program started from dhclient-exit-hooks is inheriting a couple of open udp sockets (one on port 68, and one unbound, this according to sockstat(1)). So when dhclient is killed and restarted (during a suspend and resume) it finds other processes ostensibly using it's port. One work-around is a trivial patch to the contributed dhclient code tree to set the close-on-exec flag for the offending fds. I was wondering if anyone else has encountered this problem, already fixed it, or got a better/alternative solution. I am using 4.2-RELEASE. Regards, Richard. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message