Mailing List Archive

PATCH: Do not ignore metric when reading kernel routing table (Linux/rt_netlink)
Hello,

After two nights of adding printf(...) to quagga code I have just found
the reason why zebra daemon is not able to remove some (but not all!) of
the old routes on Linux/rt_netlink. I have noticed that if I kill
ripd and zebra (SIGKILL) and start zebra again it prints lot of:

ZEBRA: netlink-cmd error: No such process, type=RTM_DELROUTE(25), seq=XXX, pid=0

messages. Zebra tries to remove old routes installed by itself but since it
ignores metric of received routes from kernel, it is only able to remove
routes with metric=0 (very unlikely with RIP). This patch fix the
netlink_routing_table() function from the rt_netlink.c file. With this
patch zebra is able to remove all my old (left after kill -9) "proto
zebra" routes.

Massage to the zebra/ChangeLog file:

2004-03-29 Krzysztof Oledzki <oleq@ans.pl>

* Do not ignore metric when reading kernel routing table
on Linux with rt_netlink interface.

Best regards,

Krzysztof Olêdzki
Re: PATCH: Do not ignore metric when reading kernel routing table (Linux/rt_netlink) [ In reply to ]
Krzysztof Oledzki wrote:
> Hello,
>
> After two nights of adding printf(...) to quagga code I have just
> found the reason why zebra daemon is not able to remove some (but
> not all!) of the old routes on Linux/rt_netlink. I have noticed
> that if I kill ripd and zebra (SIGKILL) and start zebra again it
> prints lot of:
>
> ZEBRA: netlink-cmd error: No such process, type=RTM_DELROUTE(25),
> seq=XXX, pid=0
>
> messages. Zebra tries to remove old routes installed by itself but
> since it ignores metric of received routes from kernel, it is only
> able to remove routes with metric=0 (very unlikely with RIP). This
> patch fix the netlink_routing_table() function from the
> rt_netlink.c file. With this patch zebra is able to remove all my
> old (left after kill -9) "proto zebra" routes.
>
> Massage to the zebra/ChangeLog file:
>
> 2004-03-29 Krzysztof Oledzki <oleq@ans.pl>
>
> * Do not ignore metric when reading kernel routing table
> on Linux with rt_netlink interface.

Commited. Thanks.

--
Hasso Tepper
Elion Enterprises Ltd.
WAN administrator