Peter Memishian wrote:
>  > Correct me if I'm wrong, but I think we already know that Quagga doesn't 
>  > look at IFF_UP on addresses. (It just looks at bge0, not at bge0:1 etc)
> 
> I just took a look at the 0.99.11 source.  In interface_list_ioctl(), it
> calls SIOCGLIFCONF, walks each lifreq (*including* ones for logicals),
> ignores ones which are not IFF_UP, and tracks the rest.

Some interesting comments from zebra/interface.c::if_flags_mangle()

/* if_flags_mangle: A place for hacks that require mangling
 * or tweaking the interface flags.
 *
 * ******************** Solaris flags hacks **************************
 *
 * Solaris IFF_UP flag reflects only the primary interface as the
 * routing socket only sends IFINFO for the primary interface.  Hence
 * ~IFF_UP does not per se imply all the logical interfaces are also
 * down - which we only know of as addresses. Instead we must determine
 * whether the interface really is up or not according to how many
 * addresses are still attached. (Solaris always sends RTM_DELADDR if
 * an interface, logical or not, goes ~IFF_UP).
 *
 * Ie, we mangle IFF_UP to *additionally* reflect whether or not there
 * are addresses left in struct connected, not just the actual underlying
 * IFF_UP flag.
 *
 * We must hence remember the real state of IFF_UP, which we do in
 * struct zebra_if.primary_state.
 *
 * Setting IFF_UP within zebra to administratively shutdown the
 * interface will affect only the primary interface/address on Solaris.
 ************************End Solaris flags hacks ***********************
 */

Overloading IFF_UP seems to create a lot of confusion here. 

Erik Nordmark wrote:
> Correct me if I'm wrong, but I think we already know that Quagga doesn't 
> look at IFF_UP on addresses. (It just looks at bge0, not at bge0:1 etc)

Well, it tries. Very hard :-)

Peter Memishian wrote:

> Along those lines, there may be more application capture by having IFF_UP
> mean "address is usable" and introducing a new flag such as "IFF_ADMUP" to
> indicate the address is administratively up (which is irrelevant to most
> applications, which instead just want to know whether an address they
> found via SIOCG[L]IFCONF is usable).
> 

Erik Nordmark wrote:
> Given that applications don't look at the flags on bge0:1, IFF_UP 
> doesn't seem to be useful there. IFF_ADMUP wouldn't be any more usable.
> If we move to the BSD notion of address flags then we have a higher 
> chance of applications paying attention. And BSD doesn't have an UP flag 
> for addresses.

I think that if we stopped using IFF_UP for the ipifs, we'd at least
have a better chance of not confusing the listeners about what actually
went up or down. Shouldn't the model be IFA_INVALID (for the address),
IFF_UP (for the interface),  and IFA_DISABLE (for an address that has
been administratively disabled- though I still don't see why a simple 
address-delete is not sufficient).

--Sowmini

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to