[Olsr-users] Howto feed routing-table into OLSRd2?

Henning Rogge (spam-protected)
Fri Jun 19 09:06:39 CEST 2015


Hmm...

I was unable to replicate the problem but I added code to filter out
"not unicast" type routes in the lan_import plugin.

Can you test if this resolves your problem?

Henning

On Thu, Jun 18, 2015 at 8:48 PM, Henning Rogge <(spam-protected)> wrote:
> Okay,
>
> I have to look into this and will post a patch tomorrow... should be
> quite easy to replicate.
>
> Henning
>
> On Thu, Jun 18, 2015 at 8:41 PM, Bastian Rosner <(spam-protected)> wrote:
>> Hi,
>>
>> it works! Thanks for the fixes!
>>
>> There's one corner-case I should probably mention:
>>
>> I have "unreachable" routes in one of my source tables. They are
>> generated by bird and I know i should get rid of these. Until now they
>> don't have been an issue though:
>>
>> unreachable  2001:db8::1/32 dev lo  proto bird  metric 1024  error -101
>>
>> When i don't specify a "matches" filter in import_lan to work around
>> these routes, olsrd2 segfaults.
>>
>> Because of that, only tested with IPv4 so far.
>>
>> Receiving side is still working fine.
>>
>> Cheers,
>> Bastian
>>
>> On 06/18/2015 12:36 PM, Henning Rogge wrote:
>>> Hi,
>>>
>>> after reproducing the bug and spending half a week fixing both the
>>> rfc5444 fragmentation code AND a bad overload situation in the netlink
>>> code I just pushed a fix for your (and some other) problems.
>>>
>>> I tested this in a VM with 20000 routes (10k IPv4, 10k IPv6) which worked fine.
>>>
>>> Can you see if the most recent version fixes your issues? If yes I
>>> will tag 0.8.2.
>>>
>>> Henning
>>>
>>> On Sun, Jun 14, 2015 at 2:40 PM, Bastian Rosner <(spam-protected)> wrote:
>>>> Hi,
>>>>
>>>> patch applied. Log after startup:
>>>>
>>>> 14:36:54.484 INFO(olsrv2_routing)
>>>> src-plugins/olsrv2/olsrv2/olsrv2_routing.c 935: Successfully set route
>>>> 'src-ip 10.31.105.5 gw 169.254.1.2 dst 10.31.105.4 src-prefix - metric 2
>>>> table 123 protocol 100 if eth1.31 (5)'
>>>> 14:37:22.682 WARN(os_routing)
>>>> src-plugins/subsystems/os_linux/os_system_linux.c 503: netlink recvmsg
>>>> error: No buffer space available (105)
>>>> f14:37:26.877 WARN(os_routing)
>>>> src-plugins/subsystems/os_linux/os_system_linux.c 503: netlink recvmsg
>>>> error: No buffer space available (105)
>>>> 14:37:26.895 WARN(os_routing)
>>>> src-plugins/subsystems/os_linux/os_system_linux.c 503: netlink recvmsg
>>>> error: No buffer space available (105)
>>>> 14:37:27.156 WARN(os_routing)
>>>> src-plugins/subsystems/os_linux/os_system_linux.c 503: netlink recvmsg
>>>> error: No buffer space available (105)
>>>> 14:37:34.517 WARN(os_routing)
>>>> src-plugins/subsystems/os_linux/os_system_linux.c 503: netlink recvmsg
>>>> error: No buffer space available (105)
>>>>
>>>> It should be noted that it takes about 30s for the "no buffer space
>>>> avail" message to appear after startup and followup messages do not seem
>>>> to have a strict timing pattern.
>>>>
>>>> Cheers,
>>>> Bastian
>>>>
>>>> On 06/14/2015 02:22 PM, Henning Rogge wrote:
>>>>> Hi,
>>>>>
>>>>> can you try the following patch? It is not really a solution, I just
>>>>> want to see if it makes a difference.
>>>>>
>>>>> diff --git a/src-plugins/subsystems/os_linux/os_system_linux.c
>>>>> b/src-plugins/subsystems/os_linux/os_system_linux.c
>>>>> index 54c0c9bfd424..79d9baec4545 100644
>>>>> --- a/src-plugins/subsystems/os_linux/os_system_linux.c
>>>>> +++ b/src-plugins/subsystems/os_linux/os_system_linux.c
>>>>> @@ -224,12 +224,12 @@ os_system_netlink_add(struct os_system_netlink
>>>>> *nl, int protocol) {
>>>>>     goto os_add_netlink_fail;
>>>>>   }
>>>>>
>>>>> -  nl->in = calloc(1, getpagesize());
>>>>> +  nl->in = calloc(16, getpagesize());
>>>>>   if (nl->in == NULL) {
>>>>>     OONF_WARN(nl->used_by->logging, "Not enough memory for netlink
>>>>> input buffer");
>>>>>     goto os_add_netlink_fail;
>>>>>   }
>>>>> -  nl->in_len = getpagesize();
>>>>> +  nl->in_len = 16 * getpagesize();
>>>>>
>>>>>   memset(&addr, 0, sizeof(addr));
>>>>>   addr.nl_family = AF_NETLINK;
>>>>>
>>>>>
>>>>>
>>>>> Henning
>>>>>
>>>>> On Sun, Jun 14, 2015 at 2:17 PM, Bastian Rosner <(spam-protected)> wrote:
>>>>>> On 06/14/2015 02:12 PM, Henning Rogge wrote:
>>>>>>> On Sun, Jun 14, 2015 at 2:00 PM, Bastian Rosner <(spam-protected)> wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> just to make sure that this is not related to any IPv6 settings, i
>>>>>>>> adjusted the configuration to be IPv4-only and changed to logging behavior:
>>>>>>>>
>>>>>>>> According to logs plugin lan_import loaded fine. Also inserting
>>>>>>>> neighbors route to table 123 succeeded:
>>>>>>>>
>>>>>>>> 13:48:48.293 INFO(olsrv2_routing)
>>>>>>>> src-plugins/olsrv2/olsrv2/olsrv2_routing.c 767: Set route 'src-ip - gw
>>>>>>>> 169.254.1.2 dst 10.31.105.4 src-prefix - metric 2 table 123 protocol 100
>>>>>>>> if eth1.31 (5)' (0 0 -)
>>>>>>>> 13:48:48.293 INFO(olsrv2_routing)
>>>>>>>> src-plugins/olsrv2/olsrv2/olsrv2_routing.c 935: Successfully set route
>>>>>>>> 'src-ip 10.31.105.5 gw 169.254.1.2 dst 10.31.105.4 src-prefix - metric 2
>>>>>>>> table 123 protocol 100 if eth1.31 (5)'
>>>>>>>>
>>>>>>>> Log also contains the following message:
>>>>>>>>
>>>>>>>> 13:52:29.683 WARN(os_routing)
>>>>>>>> src-plugins/subsystems/os_linux/os_system_linux.c 503: netlink recvmsg
>>>>>>>> error: No buffer space available (105)
>>>>>>>>
>>>>>>>> Do i need to run a recent version of olsrv2 on openwrt-side to accept
>>>>>>>> attached-network routes generated by ubuntu's lan_import?
>>>>>>>
>>>>>>> No, there is no change needed on the receiver side...
>>>>>>>
>>>>>>> We just hit a bottleneck in the netlink code. And I used a full
>>>>>>> pagesize of memory for the netlink buffer!
>>>>>>>
>>>>>>> Just to be sure, how many routes are you trying to import?
>>>>>>
>>>>>> Not that many i guess:
>>>>>> # ip -4 r s table 100 |wc -l
>>>>>> 846
>>>>>> # ip -6 r s table 100 |wc -l
>>>>>> 586
>>>>>>
>>




More information about the Olsr-users mailing list