netlink patch / null interface crash

Ondrej Filip feela at network.cz
Mon Mar 14 12:42:06 CET 2005


On Tue, 1 Mar 2005, Mathias DEFIVES wrote:

> Hi to the list.
>
> I wrote this ugly patch this morning in order to avoid segfault on 'show 
> routes' when some routes were already in the kernel.

So the router was in kernel before bird had been started? Can yoy send me 
samble of such routing table?

 			Ondrej

> It resolves also crashes on startup when running 'debug all' on ospf
> The problem in that case was the 'iface' part of the route was null and 
> crashed the daemon.
>
> --- unpatched/bird-1.0.11/sysdep/linux/netlink/netlink.c        Sat Jun  5 
> 11:58:23 2004
> +++ bird-1.0.11/sysdep/linux/netlink/netlink.c  Tue Mar  1 14:36:06 2005
> @@ -680,8 +680,11 @@
> if (ng && ng->scope)
>  ra.iface = ng->iface;
>         else
> -           /* FIXME: Remove this warning? Handle it somehow... */
> -           log(L_WARN "Kernel told us to use non-neighbor %I for %I/%d", 
> ra.gw, net->n.prefix, net->n.pxlen);
> +            {
> +               /* FIXME: Remove this warning? Handle it somehow... */
> +               log(L_WARN "in netlink.c Kernel told us to use non-neighbor 
> %I for %I/%d", ra.gw, net->n.prefix, net->n.pxlen);
> +               ra.iface = krt_temp_iface(p, oif);
> +            }
> }
> else
> {
>
>
> regards,
>
> --
> Mathias DEFIVES
>



More information about the Bird-users mailing list