summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaul <paul>2003-07-09 15:46:33 +0000
committerpaul <paul>2003-07-09 15:46:33 +0000
commit5549c6b365b83efa241c9f0ab378d697502ce5cc (patch)
tree48369d3944bc00fe9233700974c35a00932a6e3a
parent9c30ab6b897e08238a486dde2838ecab4fd5def3 (diff)
2003-07-09 Paul Jakma <paul@dishone.st>
* ospfd/ospf_apiserver.c: check for NULL from ospf_lookup()
-rw-r--r--ospfd/ospf_apiserver.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ospfd/ospf_apiserver.c b/ospfd/ospf_apiserver.c
index 94167842..55fe5764 100644
--- a/ospfd/ospf_apiserver.c
+++ b/ospfd/ospf_apiserver.c
@@ -87,7 +87,8 @@ ospf_apiserver_if_lookup_by_addr (struct in_addr address)
struct ospf_interface *oi;
struct ospf *ospf;
- ospf = ospf_lookup ();
+ if (!(ospf = ospf_lookup ())
+ return NULL;
for (node = listhead (ospf->oiflist); node; nextnode (node))
{
@@ -108,7 +109,8 @@ ospf_apiserver_if_lookup_by_ifp (struct interface *ifp)
struct ospf_interface *oi;
struct ospf *ospf;
- ospf = ospf_lookup ();
+ if (!(ospf = ospf_lookup ());
+ return NULL;
for (node = listhead (ospf->oiflist); node; nextnode (node))
{
@@ -1494,7 +1496,7 @@ ospf_apiserver_opaque_lsa_new (struct ospf_area *area,
{
options = LSA_OPTIONS_GET (area);
#ifdef HAVE_NSSA
- options |= LSA_NSSA_GET (area);
+ options |= LSA_OPTIONS_NSSA_GET (area);
#endif /* HAVE_NSSA */
}