[OLSR-users] quagga and olsrd

Acinonyx (spam-protected)
Sun Jun 11 11:06:22 CEST 2006




> Hello,
>
> As common as quagga is, I have seen extremely minimal discussion on 
> either the dev or users list about quagga and olsrd interaction.
>
> olsrd manipulates the kernel routing table directly, any time a route 
> is defined by zebra (doesn't matter if it's a /32 or a /24 or 
> whatever) and olsr also injects the same route, zebra becomes very 
> impolite and marks that route inactive.
>
> As I understand it, the solution to this would be to have olsrd speak 
> zclient and inject routes via zebra rather than directly to the kernel 
> routing table so zebra doesn't feel left out and doesn't get 
> vindictive. Side benefits would be the ability to redistribute OLSR 
> routes via RIP/OSPF, as well as the ability to use OLSR as your IGP on 
> the same router that is speaking BGP using quagga/bgpd to The Internet.
>
> Does anyone have any information regarding this topic?
>
> Thanks,
> -T

Hi Travis,

the problem originates from quagga. It does not accept prefixes /32 with 
a gateway the same as the destination from an interface which is marked 
broadcast. It only accepts these routes if the interface is p-t-p.

olsrd sends such routes to be passed to the kernel.

A quick solution is to make olsrd stop passing such routes to the 
kernel. In fact, I don't really understand what's the use of these 
routes in the first place.






diff -Naur olsrd-0.4.10/src/linux/kernel_routes.c 
olsrd-0.4.10-patched/src/linux/kernel_routes.c
--- olsrd-0.4.10/src/linux/kernel_routes.c      2005-02-27 
20:39:43.000000000 +0200
+++ olsrd-0.4.10-patched/src/linux/kernel_routes.c      2006-05-02 
03:37:21.000000000 +0300
@@ -87,7 +87,6 @@
   if(destination->rt_dst.v4 != destination->rt_router.v4)
     {
       ((struct sockaddr_in 
*)&kernel_route.rt_gateway)->sin_addr.s_addr=destination->rt_router.v4;
-    }
 
   kernel_route.rt_flags = destination->rt_flags;
  
@@ -130,6 +129,7 @@
  
   tmp = ioctl(ioctl_s,SIOCADDRT,&kernel_route);
   /*  kernel_route.rt_dev=*/
+    } else tmp = 0;
 
   /*
    *Send IPC route update message
@@ -256,6 +256,7 @@
 
   ((struct sockaddr_in *)&kernel_route.rt_dst)->sin_addr.s_addr = 
destination->rt_dst.v4;
   if(destination->rt_dst.v4 != destination->rt_router.v4)
+    {
     ((struct sockaddr_in *)&kernel_route.rt_gateway)->sin_addr.s_addr = 
destination->rt_router.v4;
   ((struct sockaddr_in *)&kernel_route.rt_genmask)->sin_addr.s_addr = 
destination->rt_mask.v4;
 
@@ -275,6 +276,7 @@
   */
 
   tmp = ioctl(ioctl_s, SIOCDELRT, &kernel_route);
+    } else tmp = 0;
 
 
     /*






More information about the Olsr-users mailing list