]> git.puffer.fish Git - mirror/frr.git/commitdiff
Better common router-id handling.
authorhasso <hasso>
Mon, 11 Oct 2004 17:02:40 +0000 (17:02 +0000)
committerhasso <hasso>
Mon, 11 Oct 2004 17:02:40 +0000 (17:02 +0000)
ospf6d/ChangeLog
ospf6d/ospf6_top.c
ospf6d/ospf6_top.h

index 3142bea6c78625b0f4a38e4298a18b90781c53f8..17da81d8fe3fe8362224f5b81ae6cf9c032328ee 100644 (file)
@@ -1,3 +1,9 @@
+2004-10-11 Hasso Tepper <hasso at quagga.net>
+
+       * osp6_top.c, ospf6_top.h: Better handling for router-id. If we use
+         common one, don't output it into configuration - only statically
+         configured one.
+
 2004-10-10 Paul Jakma <paul@dishone.st>
 
        * Makefile.am: fix listing of ospf_snmp.c in noinst_HEADERS
index 9fd3264148cf200da63d095a189d8524df1707fb..b0fe5ca7d286fb704a651e6291cfdaca8e43420d 100644 (file)
@@ -311,7 +311,10 @@ DEFUN (ospf6_router_id,
       return CMD_SUCCESS;
     }
 
-  o->router_id = router_id;
+  o->router_id_static = router_id;
+  if (o->router_id  == 0)
+    o->router_id  = router_id;
+
   return CMD_SUCCESS;
 }
 
@@ -618,9 +621,10 @@ config_write_ospf6 (struct vty *vty)
   if (CHECK_FLAG (ospf6->flag, OSPF6_DISABLED))
     return CMD_SUCCESS;
 
-  inet_ntop (AF_INET, &ospf6->router_id, router_id, sizeof (router_id));
+  inet_ntop (AF_INET, &ospf6->router_id_static, router_id, sizeof (router_id));
   vty_out (vty, "router ospf6%s", VNL);
-  vty_out (vty, " router-id %s%s", router_id, VNL);
+  if (ospf6->router_id_static != 0)
+    vty_out (vty, " router-id %s%s", router_id, VNL);
 
   ospf6_redistribute_config_write (vty);
   ospf6_area_config_write (vty);
index 9fd03954a0a21d1de1a5e89bdf3d20ab1c62cc6e..eae20e6eef95b38b3d0b6b57158a5e3fa1bd04c3 100644 (file)
@@ -30,6 +30,9 @@ struct ospf6
   /* my router id */
   u_int32_t router_id;
 
+  /* static router id */
+  u_int32_t router_id_static;
+
   /* start time */
   struct timeval starttime;