[quagga-dev 7724] Re: [PATCH] [zebra] fix bug #486 (lingering after IP address deletion)

David Lamparter equinox at diac24.net
Mon Feb 1 16:45:28 GMT 2010


Am Montag, den 01.02.2010, 16:29 +0000 schrieb paul at jakma.org:
> > wrapped in #if 0 / #endif. this did not cause problems because zebra
> > was (at least, on linux) notified of the address deletion by the kernel.
> > recently, quagga started ignoring self-caused notifications, so the bug
> > became apparent.

> No.. no it's not (at least, not obviously so). As I think I explained 
> on at least one bug in bugzilla.

> 1. When zebra modifies state (like configured addresses) it does NOT
>     modify its view of the kernel state (like addresses being in the
>     interface) at that point

No. It doesn't. Not for IPv4 address install, not for IPv6 address
install, not for IPv6 address delete. All these paths are fully
synchronous. When if_[un]set_prefix / if_prefix_{add,delete}_ipv6
return, the work is done. Their "OK" return code indicates full
completion of the command, either with an ACK from netlink_talk or with
a non-error return from ioctl.

Note also that the IPv6 uninstall path does exactly this.

IPv4 address delete is the sole buggy path that was left in a unfinished
code-change state.

>  	- zebra' view of kernel state is only ever modified based on kernel
>  	  events

This may be true for routes, but not for addresses.

> I know about this patch, but it seems the wrong fix. Instead, the 
> change that made zebra on linux ignore reflected address changes 
> needs to be considered in tandem with this. Why can that not be 
> fixed?

If you want to "fix" this, that would mean rewriting
ip[v6]_address_[un]install. If you want to do so, well, do it - but in
the meantime this patch is sourly needed IMHO :/.

> At least, there's a discussion we need to have about the zebra/kernel 
> data coherency model this code is supposed to follow. Fixes 
> definitely need to explain how they fit in..

The patch comment explains pretty exactly that address changes happen
synchronously. I can try to extend the explanation, but I don't really
know what more to write.


Regards,

-David





More information about the Quagga-dev mailing list