Mailing List Archive

Ospfd crash when using tun interfaces
Hello list,

I'm experiencing problem with ospfd and vtun interfaces:

1) I need to start my vtun tunnels *before* I start quagga or the
interfaces won't be taken into account.

2) If an interface goes down, then ospfd crash in zclient.c from libzebra :

in function zapi_ipv4_delete

for (i = 0; i < api->ifindex_num; i++)
{
stream_putc (s, ZEBRA_NEXTHOP_IFINDEX);
stream_putl (s, api->ifindex[i]);
}

After recompiling with -ggdb, gdb show me that ospfd crash when i remove
tun interface because api->ifindex is a wrong or corrupted address.
So the programe segv when running 'stream_putl (s, api->ifindex[i]);'

I don't know how zebra got informations about new or removed interface
but there is obviously a problem :)
Maybe the problem come from tun implementation not doing what it should
but, a segv isn't a good solution for saying me that ! :)

Maybe someone can help or need more informations ?
If someone explain me how things are supposed to be, maybe i could fix it.

Thanks

--
Romain DEGEZ - romain.degez@smartjog.com
System and network administrator
Smartjog - www.smartjog.com
82 Rue Beaubourg - 75003 PARIS - FRANCE
Re: Ospfd crash when using tun interfaces [ In reply to ]
On Thu, Dec 04, 2003 at 05:20:06PM +0100, Romain DEGEZ wrote:
> Hello list,
>
> I'm experiencing problem with ospfd and vtun interfaces:
>
> 1) I need to start my vtun tunnels *before* I start quagga or the
> interfaces won't be taken into account.
>
> 2) If an interface goes down, then ospfd crash in zclient.c from libzebra :
>
> in function zapi_ipv4_delete
>
> for (i = 0; i < api->ifindex_num; i++)
> {
> stream_putc (s, ZEBRA_NEXTHOP_IFINDEX);
> stream_putl (s, api->ifindex[i]);
> }
>
> After recompiling with -ggdb, gdb show me that ospfd crash when i remove
> tun interface because api->ifindex is a wrong or corrupted address.
> So the programe segv when running 'stream_putl (s, api->ifindex[i]);'
>
> I don't know how zebra got informations about new or removed interface
> but there is obviously a problem :)
> Maybe the problem come from tun implementation not doing what it should
> but, a segv isn't a good solution for saying me that ! :)
>
> Maybe someone can help or need more informations ?
> If someone explain me how things are supposed to be, maybe i could fix it.

this sounds exactly like the same problem I most recently posted about
on the -dev list:
http://lists.quagga.net/pipermail/quagga-dev/2003-November/000506.html

In that post you will see a link to my -users posts which explains how
we were able to work around it here.

Steve