diff options
author | Joakim Tjernlund <Joakim.Tjernlund@transmode.se> | 2008-09-24 17:15:48 +0100 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2008-09-24 17:15:48 +0100 |
commit | 6e687d74f74f36bc9d503e29377e7d42f3427221 (patch) | |
tree | 099899b58728fa5fbcfb8282a906d782076bf1ad /ospfd/ospfd.c | |
parent | 491eddc20ec072b05607d5a90513e3fffc0d85c2 (diff) | |
download | quagga-6e687d74f74f36bc9d503e29377e7d42f3427221.tar.bz2 quagga-6e687d74f74f36bc9d503e29377e7d42f3427221.tar.xz |
[ospfd] Fix SEGV during startup introduced in recent commit
* ospfd/ospfd.c: (opsf_if_update) Check if ospf_lookup() returns NULL.
Fixes bug introduced with recent ospf_network_run changes in
a49eb30a, where SEGV will happen if not the "router ospf" command has
been executed before the first interfaces are reported by zebra.
Signed-off-by: Paul Jakma <paul@quagga.net>
Diffstat (limited to 'ospfd/ospfd.c')
-rw-r--r-- | ospfd/ospfd.c | 4 |
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. */ |