summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ospfd/ospfd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index 32580ccf..c951a29a 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -998,8 +998,8 @@ ospf_if_update (struct ospf *ospf, struct interface *ifp)
if (!ospf)
ospf = ospf_lookup ();
- /* Router-ID must be configured. */
- if (ospf->router_id.s_addr == 0)
+ /* OSPF must be on and Router-ID must be configured. */
+ if (!ospf || ospf->router_id.s_addr == 0)
return;
/* Run each netowrk for this interface. */