[quagga-dev 3072] Re: interface rename problems

Andrew J. Schorr aschorr at telemetry-investments.com
Fri Apr 1 15:06:41 BST 2005


On Fri, Apr 01, 2005 at 03:52:51PM +1200, Matt Brown wrote:
> Pleased to report that it *mostly* works. All the critical functionality
> works. The renamed interface has OSPF enabled and can successfully talk
> to it's neighbour
> 
> However, the interface list still has the "original" interface it in
> (eth2 below), this doesn't seem to break anything, but it's ugly and
> inaccurate. 

Thanks for testing that.  It looks to me like the patch is working perfectly
as intended.

In my opinion, eth2 has to stay in the interface list.  At the moment,
the quagga code will almost never entirely delete an interface structure.
Instead, the paradigm is to mark it as being inactive but leave the structure
in the interface list.  The reason for this is that the user may have
entered configuration information for that interface.  If the interface
comes back up later, we still want to have that configuration information.
If we delete the interface structure entirely, then we will lose that
configuration info.

At the moment, there are only 2 places in the quagga code where the
if_delete() function (which really removes the interface and frees
the structure) is called: in ospfd when a virtual link interface is
removed, and in zebra/kernel_socket.c:ifan_read.  I am not certain
whether it is really appropriate to remove the interface in those
2 cases, perhaps somebody else knows...

There are 3 possibilities that I can see to address the "ugly" display of
eth2 that is bothering you: 1. Leave the code as is.  It works, but
is not pretty in some cases.  2. Try to detect whether there is any
configuration information associated with the interface.  If there is
none, then it would be safe to delete the interface.  3. Add an option
to hide inactive interfaces (do not show them when the user runs
"show interface" or "show ip ospf interface").  I am not immediately
certain whether option #2 is possible...

Regards,
Andy



More information about the Quagga-dev mailing list