[quagga-dev 10237] Re: quagga doesn't detect interface deletion?
bored_to_death85 at yahoo.com
Mon Jan 28 11:01:49 GMT 2013
On Mon, Jan 28, 21013 1:47 AM, Christian Franke wrote:
> While it may be suitable to delete the interface structure in your
> specific case, it is not suitable to delete it in every case.
> This is because the interface structure is not only used to contain
> information about the kernel state concerning that interface, but e.g.
> in zebra, it contains a list of IP addresses zebra should configure on
> that interface, while in ospfd, it e.g. contains the configured
> interface cost, hello interval etc.
very good point.
> What the patch does is, it simply won't print those interfaces which are
> kept around if there isn't any remarkable configuration on them.
while this is good, problem is there are lots of other "show" commands in all daemons which list interfaces (like 'show ip ospf interfaces' and lots of others), and it's not good to go and filter all those commands one by one, and this is just for "show" commands.
> In theory, when an interface is deleted from the kernel, it should be
> possible to delete its structure after verifying that it doesn't contain
> interesting configuration data. I just think that this is not
> implemented as it is a special case and would need to be determined for
> each Quagga daemon separately. Also, it seems to me that such a check
> would be prone to contain interesting bugs without very much benefit.
I don't think this is a rare special case (it happens anytime an interface is being renamed or deleted, which is a regular thing) and I don't think it's not important, but then again, I think it depends on what you want to do with quagga.
But I think even if we want to save previous configurations for an interface, we can simply add a flag to interface structure to show us deletion-state(instead of deleting the whole instance), [which I believe we have a similar flag right-now in implementation] but important thing is, if that flag is showing that interface is deleted, this interface should not get involved in any processing or come in any output in any daemons. this way, we would have both things, if an interface is being deleted, it doesn't be shown in any output or doesn't get involved in any other process, but if that exact interface gets added again (like in VPN example you mentioned) we simply unset the flag so that from now-on we would have it with all its previous configurations.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Quagga-dev