[quagga-dev 5133] [PATCH] RIPv2 Redistributing Static Routes

Daniel Ng daniel_ng11 at lycos.com
Fri Nov 23 06:39:44 GMT 2007


When 'Redistribute Static' is configured in ripd, this patch suppresses 
advertisments of Static Routes via the interface of the Static Route's Next-
Hop.

Without this patch, you will end up with routing loops as the remote router 
will see the Static Routes and reflect them back to the orignating router via 
the same interface.

Would someone please commit (and test) this patch, as I do not have commit 
privileges.

Tested on 0.99.9.

Cheers,
Daniel


--- ripd.c  2007-11-22 16:19:10.000000000 +1100
+++ ripd.c  2007-11-23 17:27:09.000000000 +1100
@@ -2269,7 +2269,7 @@
              * (in order to handle the case when multiple subnets are
              * configured on the same interface).
              */
-     if (rinfo->type == ZEBRA_ROUTE_RIP  &&
+            if ( ((rinfo->type == ZEBRA_ROUTE_RIP) || (rinfo->type == 
ZEBRA_ROUTE_STATIC))  &&
                  rinfo->ifindex == ifc->ifp->ifindex)
        continue;
      if (rinfo->type == ZEBRA_ROUTE_CONNECT &&
@@ -2367,7 +2367,7 @@
              * (in order to handle the case when multiple subnets are
              * configured on the same interface).
              */
-   if (rinfo->type == ZEBRA_ROUTE_RIP  &&
+          if ( ((rinfo->type == ZEBRA_ROUTE_RIP) || (rinfo->type == 
ZEBRA_ROUTE_STATIC)) &&
         rinfo->ifindex == ifc->ifp->ifindex)
         rinfo->metric_out = RIP_METRIC_INFINITY;
    if (rinfo->type == ZEBRA_ROUTE_CONNECT &&





More information about the Quagga-dev mailing list