diff options
author | hasso <hasso> | 2004-10-11 17:02:40 +0000 |
---|---|---|
committer | hasso <hasso> | 2004-10-11 17:02:40 +0000 |
commit | c8a440eca0645a8a78140f83907acce25a3c67c6 (patch) | |
tree | 44787becdd91b85170b32076c5baaf3f0acaa970 /ospf6d/ospf6_top.c | |
parent | de4a643fdbf7da014e6556b74dca5ce43a2b8cd7 (diff) | |
download | quagga-c8a440eca0645a8a78140f83907acce25a3c67c6.tar.bz2 quagga-c8a440eca0645a8a78140f83907acce25a3c67c6.tar.xz |
Better common router-id handling.
Diffstat (limited to 'ospf6d/ospf6_top.c')
-rw-r--r-- | ospf6d/ospf6_top.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 9fd32641..b0fe5ca7 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -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); |