]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Do not allow interdependent recursive routes.
authorOndrej Zajicek <santiago@crfreenet.org>
Tue, 3 Aug 2010 06:26:47 +0000 (08:26 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 3 Aug 2010 06:26:47 +0000 (08:26 +0200)
nest/rt-table.c

index ef0704282ebee85e2388fadf13015f85df626e36..389baaa24b2f79c8b14894263b2906b4ca3f0879 100644 (file)
@@ -1509,7 +1509,16 @@ rt_update_hostentry(rtable *tab, struct hostentry *he)
       rta *a = n->routes->attrs;
       pxlen = n->n.pxlen;
 
-      if (a->dest == RTD_DEVICE)
+      if (a->hostentry)
+       {
+         /* Recursive route should not depend on another recursive route */
+         log(L_WARN "Next hop address %I resolvable through recursive route for %I/%d",
+             he->addr, n->n.prefix, n->n.pxlen);
+         he->iface = NULL;
+         he->gw = IPA_NONE;
+         he->dest = RTD_UNREACHABLE;
+       }
+      else if (a->dest == RTD_DEVICE)
        {
          if (if_local_addr(he->addr, a->iface))
            {