> Other than forking and execing ifconfig, which I think most
 > application writers would think is "messy," we don't have a good,
 > defined way for an application to turn off DHCP on an interface --
 > other than messing with the flags.

They could zero the IP address I suppose -- though as you say, fundamental
questions are raised about what they're actually trying to do.

 > So, it's not completely inconceivable that someone, somewhere might
 > have relied on ~IFF_UP meaning "turn off DHCP now."  There's some
 > risk, but I suspect it's pretty low, particularly for a Minor release.
 > (Why do people need to turn off DHCP from within an application
 > anyway?  And if they do, why don't they need to turn it back on?)
 > 
 > If you change the way DHCP treats ~IFF_UP, then what are the specific
 > semantics?  Is it possible for DHCP to use DLPI while the interface is
 > down to establish a new address and turn IFF_UP back on, or are we
 > "stuck" in that state until the address ages away?  (My guess is that
 > it's the latter.)

In Nevada, DLPI isn't used anymore by DHCP except as a transient means to
get the hardware address and ARP type -- so I don't think DLPI factors
into the equation.

 > A somewhat more concerning issue is the fragile way that DHCP
 > operates: if you breathe on it, it falls over.  The user can't do tiny
 > things such as fixing a weird netmask or an incorrect broadcast
 > address without having DHCP run away, and at least to me, that's
 > something that makes it *REALLY* hard to administer and deal with in
 > 'real life,' where configurations are far from completely perfect, and
 > where administrators don't expect the system to fight against them.
 > 
 > As an "outsider," I would have expected that if I tweak anything on
 > the interface, even the address, DHCP still keeps doing its thing.  It
 > maintains the lease that I originally got (not necessarily whatever
 > address is on the interface now), and if anything changes in a DHCPACK
 > (if the server provides changed parameters) then those changes get
 > applied and wipe out whatever tweaks I made.  "Abandon" isn't what I
 > was expecting.
 > 
 > I guess I'm saying I'd be supportive of going _further_ than just
 > IFF_UP, but if that's the only change you want, then I'd support that.

I think you bring up a good point, and I agree that the abandon mechanism
is probably too hair-trigger.  At one end of the spectrum, there are cases
(such as unplumb or change of IP address) where abandoning seems the only
reasonable behavior.  At the other end, there are cases like clearing
IFF_UP or tweaking the netmask where there's no clear indication that
anyone has asked DHCP to step aside, and in fact its urge to run gets in
the way.

-- 
meem

Reply via email to