[Olsr-dev] OSLRd2 segmentation fault

Gabriel (spam-protected)
Fri Apr 22 12:34:49 CEST 2016

The patch works for Debian Wheezy on MIPS.

I've also tested the patch on openwrt 15.05, and it is not working. The
olsrd2 daemon is still segfaulting at the same point.

This is the last debug message:

12:01:19.596 DEBUG(olsrv2_routing) eady gone 589: Initialize route entry
dst [] with pathcost 16776960

I compiled the package with "-ggdb" flag and then I tried to debug with
gdb on the router.

When olsrd2 crashes, gdb print this warning thus is impossible to backtrace:

warning: GDB can't find the start of the function at 0x77fc5224.

This is a stack dump just after the segfault:


I've also tried the patch I wrote and it works, so I assume that the
problem is at the same memcpy instruction.


On 21/04/2016 07:59, Henning Rogge wrote:
> On Thu, Apr 21, 2016 at 4:59 AM, Gabriel <(spam-protected)> wrote:
>>> Using gdb I found out that the instruction causing the SEGFAULT was in
>>> olsrv2_routing.c at line 598:
>>> memcpy(&rtentry->last_originator, last_originator,
>>> sizeof(*last_originator));
>>> After the the SEGFAULT I printed the variable "last_originator" in gdb
>>> and it was null.
>>> I
> Thank you for locating this place.
>> Sorry, I forgot to explain what I've done:
>> I just put an if statement before the instructions to copy the memory
>> locations only if the src (last_originator) is not null.
> Hmm... I think I see what happens.
> For some reason the IPv6 address on the local node is still missing
> when the other side sends a NHDP message.
> Could you test the following attached patch? I think this one fixes
> the original problem.
> Henning

More information about the Olsr-dev mailing list