]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Bugfix - nasty bug in router LSA origination - Router did not describe all interfaces.
authorOndrej Filip <feela@network.cz>
Tue, 13 Jul 2004 12:21:24 +0000 (12:21 +0000)
committerOndrej Filip <feela@network.cz>
Tue, 13 Jul 2004 12:21:24 +0000 (12:21 +0000)
proto/ospf/topology.c

index c368d91f6f92fcf767b57730c7fbf6451e98100b..027ef8fcf3ffc1869e424d767c790f491405a138 100644 (file)
@@ -94,7 +94,10 @@ originate_rt_lsa_body(struct ospf_area *oa, u16 * length)
            ln->data = 0xffffffff;
          }
          else
+          {
+            ln--;
            i--;                /* No link added */
+          }
        }
        break;
       case OSPF_IT_BCAST:
@@ -146,10 +149,19 @@ originate_rt_lsa_body(struct ospf_area *oa, u16 * length)
           rt->veb.bit.v = 1;
         }
        else
+        {
+          ln--;
          i--;          /* No link added */
+        }
+        break;
+      default:
+        ln--;
+       i--;            /* No link added */
+        log("Unknown interface type");
         break;
       }
     }
+    ln++;
   }
   rt->links = i;
   *length = i * sizeof(struct ospf_lsa_rt_link) + sizeof(struct ospf_lsa_rt) +