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

David Lamparter equinox at diac24.net
Tue Feb 2 01:58:27 GMT 2010


Am Dienstag, den 02.02.2010, 01:30 +0000 schrieb paul at jakma.org:
> Looking at the commit logs and the zebra test case it seems I was 
> working on keeping address state coherent solely based on kernel 
> events.

Yeah. The graph looks like it too. (I made it with cscope, grep and
graphviz btw...)

> It'd be nice if someone would go clean up the ip address 
> install/uninstall paths too. However, if you test the quick fix on 
> BSD and Linux, then I'll not object anymore.

On Linux it fixes the bug. FreeBSD:

FreeBSD 8.0-RELEASE
0.99.15:
erinome.n2.diac24.net(config-if)# no ip address 10.0.0.1/24
ZEBRA: Kernel: Len: 224 Type: RTM_DELETE
erinome.n2.diac24.net(config-if)#
ZEBRA: Kernel: Len: 116 Type: RTM_DELADDR
ZEBRA: ifam_read_mesg: ifindex 3, ifname lo0, ifam_addrs 0xb4,
ifam_flags 0x1, addr 10.0.0.1/24 broad 10.0.0.1 dst 0.0.0.0 gateway
0.0.0.0
ZEBRA: MESSAGE: ZEBRA_INTERFACE_ADDRESS_DELETE 10.0.0.1/24 on lo0


with patch:
erinome.n2.diac24.net(config-if)# no ip address 10.0.0.1/24
ZEBRA: MESSAGE: ZEBRA_INTERFACE_ADDRESS_DELETE 10.0.0.1/24 on lo0
ZEBRA: Kernel: Len: 224 Type: RTM_DELETE
erinome.n2.diac24.net(config-if)#
ZEBRA: Kernel: Len: 116 Type: RTM_DELADDR
ZEBRA: ifam_read_mesg: ifindex 3, ifname lo0, ifam_addrs 0xb4,
ifam_flags 0x1, addr 10.0.0.1/24 broad 10.0.0.1 dst 0.0.0.0 gateway
0.0.0.0


ZEBRA_INTERFACE_ADDRESS_DELETE moves up to the point after if_ioctl
returned. the deletion failure path (which i can't test, how the heck do
you trigger a deletion failure?) now works by checking for the return
value of if_ioctl.

No negative impact, although we move a little bit farther away from
bookkeeping addresses based on kernel events. But the latter we have to
fix properly anyway, so, well...

Regards and good night,


-David





More information about the Quagga-dev mailing list