[Olsr-users] Howto feed routing-table into OLSRd2?
Henning Rogge
(spam-protected)
Thu Jun 18 12:36:26 CEST 2015
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
>>>
>>>
>>>
>>> --
>>> Olsr-users mailing list
>>> (spam-protected)
>>> https://lists.olsr.org/mailman/listinfo/olsr-users
>
>
> --
> Olsr-users mailing list
> (spam-protected)
> https://lists.olsr.org/mailman/listinfo/olsr-users
More information about the Olsr-users
mailing list