From owner-freebsd-net@FreeBSD.ORG Mon Feb 11 02:53:39 2008 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B8C116A419; Mon, 11 Feb 2008 02:53:39 +0000 (UTC) (envelope-from robertjenssen@ozemail.com.au) Received: from outbound.icp-qv1-irony-out1.iinet.net.au (outbound.icp-qv1-irony-out1.iinet.net.au [203.59.1.108]) by mx1.freebsd.org (Postfix) with ESMTP id 58BFC13C458; Mon, 11 Feb 2008 02:53:36 +0000 (UTC) (envelope-from robertjenssen@ozemail.com.au) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAABRBr0d8qxjJ/2dsb2JhbAAIpnA X-IronPort-AV: E=Sophos;i="4.25,331,1199631600"; d="scan'208";a="285222456" Received: from unknown (HELO [192.168.0.4]) ([124.171.24.201]) by outbound.icp-qv1-irony-out1.iinet.net.au with ESMTP; 11 Feb 2008 11:23:56 +0900 From: Robert Jenssen To: brooks@freebsd.org Date: Mon, 11 Feb 2008 13:23:57 +1100 User-Agent: KMail/1.9.7 References: <200802111137.21550.robertjenssen@ozemail.com.au> <20080211010626.GA69153@lor.one-eyed-alien.net> In-Reply-To: <20080211010626.GA69153@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802111323.57387.robertjenssen@ozemail.com.au> Cc: net@freebsd.org Subject: Re: dhclient conflict between /sbin/devd and /etc/rc.d/netif ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2008 02:53:39 -0000 Hi, Thanks for the prompt reply. By "owned", I meant that "ps -ajx" shows /sbin/devd as the process group leader. For example, at the moment on my system: [root etc]ps -axj | grep devd root 5727 1 5727 5727 0 Is ?? 0:00.00 /sbin/devd [root etc]ps -axj | grep dhclient root 6373 1 5727 5727 0 I ?? 0:00.00 dhclient: ral0 _dhcp 6395 1 6395 6395 0 Ss ?? 0:00.09 dhclient: ral0 [root etc] I agree, /sbin/devd calls /etc/rc.d/dhclient which checks for the existence of a running dhclient. I find the rc scripts hard to follow but so far as I can see /etc/rc.d/netif simply calls "ifconfig dhcp" and doesn't check for a running dhclient. Here are the relevant lines in my rc.conf: rc_debug="YES" ifconfig_ral0="inet dhcp channel 10 wpa up" devd_enable="YES" Here is the output of "/etc/rc.d/netif restart": [root etc]rc.d/netif restart rc.d/netif: DEBUG: run_rc_command: doit: network_stop Stopping network:Stopping wpa_supplicant. /etc/rc.d/wpa_supplicant: DEBUG: run_rc_command: doit: kill -TERM 6229 /etc/rc.d/dhclient: DEBUG: run_rc_command: doit: dhclient_stop lo0 fwip0 fwe0 rl0 ral0 plip0rc.d/netif: DEBUG: The following interfaces were not configured: . rc.d/netif: DEBUG: run_rc_command: doit: network_start rc.d/netif: DEBUG: Cloned: Starting wpa_supplicant. /etc/rc.d/wpa_supplicant: DEBUG: run_rc_command: doit: /usr/sbin/wpa_supplicant -q -B -i ral0 -c /etc/wpa_supplicant.conf -D bsd -P /var/run/wpa_supplicant/ral0.pid rc.d/netif: DEBUG: checkyesno: synchronous_dhclient is set to YES. /etc/rc.d/dhclient: DEBUG: run_rc_command: doit: dhclient_start /etc/rc.d/dhclient: DEBUG: checkyesno: background_dhclient is set to NO. ral0: no link ............ got link DHCPREQUEST on ral0 to 255.255.255.255 port 67 DHCPDISCOVER on ral0 to 255.255.255.255 port 67 interval 8 DHCPOFFER from 192.168.0.1 DHCPREQUEST on ral0 to 255.255.255.255 port 67 DHCPACK from 192.168.0.1 bound to 192.168.0.4 -- renewal in 43200 seconds. lo0: flags=8049 metric 0 mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 ral0: flags=8843 metric 0 mtu 1500 ether 00:xx:.... inet 192.168.0.4 netmask 0xffffff00 broadcast 192.168.0.255 media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/54Mbps) status: associated ssid xxxxxxxxxxxx channel 10 (2457 Mhz 11g) bssid 00:xx:..... authmode WPA privacy ON deftxkey UNDEF TKIP 3:128-bit txpower 50 bmiss 7 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi11g 7 roam:rate11g 5 protmode CTS roaming MANUAL rc.d/netif: DEBUG: The following interfaces were not configured: fwip0 fwe0 rl0 plip0 /etc/rc.d/ipfilter: DEBUG: checkyesno: ipfilter_enable is set to NO. Now I have four dhclient processes: [root etc]ps -axj | grep dhclient root 9824 1 5727 5727 0 S ?? 0:00.00 dhclient: ral0 [pri _dhcp 9853 1 9853 9853 0 Ss ?? 0:00.00 dhclient: ral0 (dhc _dhcp 9880 1 9880 9880 0 Ss ?? 0:00.00 dhclient: ral0 (dhc root 9826 1 9283 1916 0 S p0 0:00.00 dhclient: ral0 [pri It seems that devd has started two new dhclients and netif has started its own pair as well. 1916 is the process id of the bash shell I su'ed from to start /etc/rc.d/netif. Best regards, Rob Jenssen