dhclient does not reliably exit when the device disappears
Sam Babu G
sambabug at hotmail.com
Thu Feb 23 06:02:05 UTC 2006
Hi,
We too noticed the same problem.
We worked around this problem. When wifi-device is turned-on/off, ifup /
ifdown $INTERFACE is invoked. Hence by incorpating the option
"BOOTPROTO=dhcp" in the ifcfg-$INTEFACE file, the scripts (ifup/ifdown) take
care of the dhclient too. I am not sure whether this is the correct way or
not, but it works perfectly. And I don't see any advantage of starting
dhclient manually (please correct me if I am wrong).
Comming to the problem, my understanding from man pages of dhclient is that
the dhclient runs in the forground intially till it configures the interface
and then revert to run in the back ground. Hence starting dhclient everytime
we switch on the wireless device is not a solution. but the solution is to
intimate the running dhclient that the device is up/down and this is done
through omapi (I don't know how :-( ).
I quote the relavent part of the dhclient
<QUOTE>
The DHCP client normally exits if it isnât able to identify any network
interfaces to configure. On laptop computers and other computers
with
hot-swappable I/O buses, it is possible that a broadcast interface
may
be added after system startup. The -w flag can be used to cause
the
client not to exit when it doesnât find any such interfaces.
The
omshell (8) program can then be used to notify the client when a
net-
work interface has been added or removed, so that the client
can
attempt to configure an IP address on that interface.
<UNQUOTE>
If any one knows how, please let-us know.
Very Truly Yours
Sam Babu G
Consultant
Hellosoft India Pvt. Ltd.,
8-2-703, Road No.12,
Banjara Hills,
Hyderabad - 500 034, AP.
Telephone : (040) 2332 7062
(040) 2332 7063
Fax : (040) 2331 4221
Cell No. : +91 9866221251
email : sam at iiit.net
----- Original Message -----
From: "Andrew Pollock" <apollock at debian.org>
To: <dhcp-hackers at isc.org>
Cc: "martin f krafft" <madduck at debian.org>;
<353280-forwarded at bugs.debian.org>
Sent: Thursday, February 23, 2006 5:17 AM
Subject: dhclient does not reliably exit when the device disappears
> Hi DHCP hackers.
>
> I recently received this bug report, which I'm forwarding on for
> discussion/consideration.
>
> regards
>
> Andrew
>
> On Fri, Feb 17, 2006 at 11:34:53AM +0100, martin f krafft wrote:
> > Package: dhcp3-client
> > Version: 3.0.3-6
> > Severity: normal
> >
> > If I remove a network device under control of dhclient (e.g. a wifi
> > adapter that supports being turned off by ACPI), dhclient will
> > complain but it will not die. As I move around a lot and turn wifi
> > on and off as needed, I end up with dozens of dhclient processes for
> > the wifi device, which tend to like to get into each others way.
> >
> > I think it would make sense for dhclient to exit when its device
> > disappears.
> >
> > lapse:/etc/ifplugd/action.d# dhclient wifi
> > Internet Systems Consortium DHCP Client V3.0.3
> > Copyright 2004-2005 Internet Systems Consortium.
> > All rights reserved.
> > For info, please visit http://www.isc.org/products/DHCP
> >
> > Listening on LPF/wifi/00:14:a4:04:ea:dc
> > Sending on LPF/wifi/00:14:a4:04:ea:dc
> > Sending on Socket/fallback
> > DHCPDISCOVER on wifi to 255.255.255.255 port 67 interval 7
> > *** i turned the device off here ***
> > receive_packet failed on wifi: Network is down
> > DHCPDISCOVER on wifi to 255.255.255.255 port 67 interval 9
> > send_packet: No such device
> > DHCPDISCOVER on wifi to 255.255.255.255 port 67 interval 11
> > send_packet: No such device
> > DHCPDISCOVER on wifi to 255.255.255.255 port 67 interval 11
> > send_packet: No such device
> > DHCPDISCOVER on wifi to 255.255.255.255 port 67 interval 11
> > send_packet: No such device
> > DHCPDISCOVER on wifi to 255.255.255.255 port 67 interval 12
> > send_packet: No such device
> > No DHCPOFFERS received.
> > No working leases in persistent database - sleeping.
> > lapse:/etc/ifplugd/action.d# ps aux | grep [d]hc
> > root 23599 0.0 0.0 2164 508 ? Ss 11:31 0:00
dhclient wifi
> >
> > -- System Information:
> > Debian Release: testing/unstable
> > APT prefers stable
> > APT policy: (700, 'stable'), (600, 'testing'), (98, 'unstable'), (1,
'experimental')
> > Architecture: i386 (i686)
> > Shell: /bin/sh linked to /bin/bash
> > Kernel: Linux 2.6.15-1-686
> > Locale: LANG=en_GB, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
> >
> > Versions of packages dhcp3-client depends on:
> > ii debianutils 2.15.2 Miscellaneous utilities
specific t
> > ii dhcp3-common 3.0.3-6 Common files used by all
the dhcp3
> > ii libc6 2.3.5-13 GNU C Library: Shared
libraries an
> >
> > dhcp3-client recommends no packages.
> >
> > -- no debconf information
> >
> > --
> > .''`. martin f. krafft <madduck at debian.org>
> > : :' : proud Debian developer and author: http://debiansystem.info
> > `. `'`
> > `- Debian - when you have better things to do than fixing a system
> >
> > Invalid/expired PGP (sub)keys? Use subkeys.pgp.net as keyserver!
> >
> > in seattle, washington, it is illegal to carry a concealed weapon that
> > is over six feet in length.
>
>
>
>
More information about the dhcp-hackers
mailing list