]> git.puffer.fish Git - mirror/frr.git/commitdiff
[ospfd] Bug #288: do not change router ID unless forced by manual configuration
authorAndrew J. Schorr <ajschorr@alumni.princeton.edu>
Thu, 27 Jul 2006 22:29:06 +0000 (22:29 +0000)
committerAndrew J. Schorr <ajschorr@alumni.princeton.edu>
Thu, 27 Jul 2006 22:29:06 +0000 (22:29 +0000)
2006-07-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* ospfd.c: (ospf_router_id_update) Fix and document the algorithm for
  selecting the router ID: if there is not a statically configured ID,
  then stick to the most recent value to avoid disruptive changes.
  This should fix bug #288.

ospfd/ChangeLog
ospfd/ospfd.c

index 61ca5e0f1d7642d3e8d0955373f89ed30855de43..dfcbe89948583e64986cf4d05247bd0d103d3883 100644 (file)
@@ -1,3 +1,10 @@
+2006-07-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * ospfd.c: (ospf_router_id_update) Fix and document the algorithm for
+         selecting the router ID: if there is not a statically configured ID,
+         then stick to the most recent value to avoid disruptive changes.
+         This should fix bug #288.
+
 2006-07-26 Paul Jakma <paul.jakma@sun.com>
 
        * ospf_lsa.{c,h}: (ospf_lsa_unlock) Change to take a double pointer
index ef8272b0442480c073348995007cc9528d6de458..95615e4a47b8ee70e5ec8718a4e6ea1ff41acbb8 100644 (file)
@@ -84,8 +84,17 @@ ospf_router_id_update (struct ospf *ospf)
 
   router_id_old = ospf->router_id;
 
+  /* Select the router ID based on these priorities:
+       1. Statically assigned router ID is always the first choice.
+       2. If there is no statically assigned router ID, then try to stick
+          with the most recent value, since changing router ID's is very
+         disruptive.
+       3. Last choice: just go with whatever the zebra daemon recommends.
+  */
   if (ospf->router_id_static.s_addr != 0)
     router_id = ospf->router_id_static;
+  else if (ospf->router_id.s_addr != 0)
+    router_id = ospf->router_id;
   else
     router_id = router_id_zebra;