possible bugfix for spf calculation
authorHenning Rogge <rogge@fgan.de>
Thu, 17 Apr 2008 18:26:42 +0000 (20:26 +0200)
committerHenning Rogge <rogge@fgan.de>
Thu, 17 Apr 2008 18:26:42 +0000 (20:26 +0200)
src/lq_route.c

index 90a9804..b37992d 100644 (file)
@@ -216,15 +216,19 @@ olsr_spf_relax (struct avl_tree *cand_tree, struct tc_entry *tc)
     /*
      * We are not interested in dead-end or dying edges.
      */
-    if (!tc_edge->edge_inv || (tc_edge->flags & OLSR_TC_EDGE_DOWN)) {
+    if (!tc_edge->edge_inv || ((tc_edge->flags | tc_edge->edge_inv->flags) & OLSR_TC_EDGE_DOWN) != 0) {
 #ifdef DEBUG
       OLSR_PRINTF(2, "SPF:   ignoring edge %s\n",
                   olsr_ip_to_string(&buf, &tc_edge->T_dest_addr));
+      if (!tc_edge->edge_inv) {
+        OLSR_PRINTF(2, "SPF:     no inverse edge\n");
+      }
+      
       if (tc_edge->flags & OLSR_TC_EDGE_DOWN) {
         OLSR_PRINTF(2, "SPF:     edge down\n");
       }
-      if (!tc_edge->edge_inv) {
-        OLSR_PRINTF(2, "SPF:     no inverse edge\n");
+      if (tc_edge->edge_inv->flags & OLSR_TC_EDGE_DOWN) {
+        OLSR_PRINTF(2, "SPF:     inverse edge down\n");
       }
 #endif
       continue;