[olsr-dev] Why are 1-hop routes with destination==gateway added
Acinonyx
(spam-protected)
Fri Jul 21 23:58:46 CEST 2006
Hello Erik,
this issue has been discussed before in this list.
The problem originates from quagga (zebra daemon) which doesn't accept
as valid, routes with destination equal to gateway if they are not
assigned to a p-t-p interface.
Either case, destintation ==gateway routes in olsr seems practically
useless so I removed this part of code to work with quagga.
Regards,
Bill
P.S. A patch for 0.4.10 follows.
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-dev
mailing list