Detecting link state in dhcpc...

Rogelio Serrano rogelio.serrano at gmail.com
Sun Feb 11 02:23:12 UTC 2007


On 2/11/07, Denis Vlasenko <vda.linux at googlemail.com> wrote:
> On Saturday 10 February 2007 19:35, Jason Schoon wrote:
> > > > I recall reading on the list recently that someone was thinking about
> > > > modifying dhcpc to do nice things when the link state changes.
> > > >
> > > > Has this been done?
> > > >
> > > > If not, I think I will be doing it very soon.
> > >
> > > Why do you need this?
> > >
> > > Windows have such a behavior (of severing all TCP connections
> > > whenever I need to unplug my network cable for 5 seconds)
> > > and it is _awful_.
> > >
> > > I hope you plan to implement something less annoying then this.
> >
> > Perhaps he is talking more along the lines of doing an automatic renewal
> > when a link is upped.  For example, plugging into a new network.  You want
> > to get a new address on that net, not keep using an old one.  I have
> > implemented that several times in different DHCP clients.
>
> Why? If I unplug my machine from network, it does NOT
> automatically mean I should renew DHCP address.
>
> It is needed sometimes, but other times (e.g. "I need to unplug
> my machine for 10 seconds...") it will be utterly inconvenient.
>
> If you really want it, perhaps kernel sends a hotplug event
> or something like it on link down/link up,
> so you can hook onto it and kill/restart udhcpc?
> --
> vda
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/cgi-bin/mailman/listinfo/busybox
>

How does the machine find out by itself that you are "just "unplugging
for 10 seconds and dont want to renew your address?

I would rather have the adapter renew the address anytime the
interface goes up. And notify the system that the interface is down
when the link goes down.

-- 
the thing i like with my linux pc is that i can sum up my complaints in 5 items



More information about the busybox mailing list