Was messing around with ospf and got myself into a situation where the
router ID's were the same on two boxes because I only did a reload on
one of them when I changed the loopback IP's.

This adds a warning when reloading if the router ID changes (there was
already a comment saying as much). Same patch can probably be applied to
ospf6d if people think it's useful.

Mitchell


diff --git a/usr.sbin/ospfd/ospfd.c b/usr.sbin/ospfd/ospfd.c
index d01a2fa66..db59fc718 100644
--- a/usr.sbin/ospfd/ospfd.c
+++ b/usr.sbin/ospfd/ospfd.c
@@ -694,6 +694,10 @@ merge_config(struct ospfd_conf *conf, struct
ospfd_conf *xconf)
        int                      rchange = 0;

        /* change of rtr_id needs a restart */
+       if (conf->rtr_id.s_addr != xconf->rtr_id.s_addr &&
+           ospfd_process == PROC_MAIN)
+               log_warnx("Router-ID changed in new configuration. This will "
+                   "not apply until ospfd is restarted.");
        conf->flags = xconf->flags;
        conf->spf_delay = xconf->spf_delay;
        conf->spf_hold_time = xconf->spf_hold_time;

Reply via email to