> Vasumathi and I were talking about this.. even today (with ifconfig)
 > the plumb and the SLIFADDR are separate operations, triggered from userspace,
 > so there is a window where the 0'th interface has been plumbed with 0.0.0.0
 > but not yet SLIFADDR'ed, and anything can happen (including two
 > SLIFADDRs racing).

If you have two things trying to configure the system at the same time,
you have bigger problems.  As for applications, it's unlikely they'd be
affected since (a) most addresses are configured early in system boot, (b)
the 0.0.0.0 address is never brought IFF_UP so it's largely ignored (c)
when some address is brought IFF_UP it will trigger a routing socket
message which affords the opportunity for applications that care to rescan
and adjust and (d) the window is small.

All that said, I have no issue with setting the address at the same time
the zeroth interface is plumbed.  However, there still may be other
properties that have not yet been configured according to the
administrator's requirements (e.g., flags, zoneid for shared-stack, ...).
Again this race exists today but is mitigated both by the fact that
configuration is fairly unusual, the window is small, and IFF_UP is either
done last or a down/up dance is done which triggers an application rescan.

 > But long term, wouldn't it be better to fix this so that the 0'th logical
 > interface *is* really 0.0.0.0 at all times (similar to the BSD model
 > of having an AF_LINK as the first ifaddr on an ifnet)?

That just seems strange to me.

-- 
meem
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to