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

Henning Rogge (spam-protected)
Sun Jun 14 14:22:47 CEST 2015


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




More information about the Olsr-users mailing list