netlink patch / null interface crash
Mathias DEFIVES
bird at ml.esds.com
Tue Mar 1 14:48:55 CET 2005
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.
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