udhcp and busybox

Rob Landley rob at landley.net
Mon Mar 27 10:22:41 PST 2006


On Monday 27 March 2006 3:55 am, Natanael Copa wrote:
> Rich Felker wrote:
> > On Sun, Mar 26, 2006 at 04:22:12PM -0500, Rob Landley wrote:
> >>> So you have two options - either
> >>> delete the current gateway first or don't add another gateway.  I
> >>> agree, using the udhcp nameservers is not as important.
> >>
> >> No, if it supplies one I'll happily modify /etc/resolv.conf.  I can see
> >> a command line option telling it not to do that, though.
> >
> > I'm just a user, but I'm strongly against dhcp clients overwriting
> > system config files by default. Just because all the broken mainstream
> > ones do it doesn't mean its a good idea.
>
> I'm just curious, because I'm always been irritated about dhcp clients
> modifying the /etc/resolv.conf file. Do you have any better suggestions
> how a dhcp client should set the nameservers without modifying
> /etc/resolv.conf?

I do chattr +s /etc/resolv.conf when I don't want them to.  I'm sure there's a 
more graceful way... :)

I suppose the dhcp client could try to resolve "." out of the dns servers that 
are already there to see if life is good.  Of course there's no guarantee 
that you aren't talking to servers from a previous coffee shop that will 
redirect you to an inappropriate login page, or that you aren't running a 
cacheing nameserver on loopback that can't get out to the net from where you 
are right now...

They could also try to resolve "busybox.net" and see if they get the known IP, 
but that's hideously brittle...

Command line option seems the sane way.

Rob
-- 
Never bet against the cheap plastic solution.


More information about the busybox mailing list