> > Peter Memishian wrote: >> > # ipadm create-if bge0 >> > # ipadm create-addr -i bge0 10.1.2.3/24 >> > > Since this is the first time an address is configured on bge0, >> > option 1) Should the address be created on the 0th logical interface, or >> > option 2) Should create-addr always add a new logical interface? >> >> I'd vote for (1). One thing we learned the hard way with the old IPMP >> implementation is that there are applications out there that just grab >> whatever is in the 0th slot and never look at the other IP addresses on >> the interface. (i.e., they do a SIOCG[L]IFADDR for foo0, or do a >> SIOCG[L]IFCONF and stop a the first thing they find for foo0).
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). I suggested that we should add a new ioctl that will atomically (SLIFFADDR the 0'th interface if it is 0.0.0.0, else do the ADDIF). 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)? On (04/23/09 20:44), Erik Nordmark wrote: > It might later make sense to tweak the kernel (as part of the IP control > part refactoring project?) so that one can create an ill without > creating an ipif, in which case libadm can always do an SIOCSLIFADDIF > for a create-addr. But that is something we can worry about later. right. --Sowmini _______________________________________________ networking-discuss mailing list [email protected]
