]> git.puffer.fish Git - mirror/frr.git/commitdiff
* ospf_snmp.c: Don't crash in snmp query if ospf instance doesn't
authorhasso <hasso>
Sun, 27 Mar 2005 13:32:25 +0000 (13:32 +0000)
committerhasso <hasso>
Sun, 27 Mar 2005 13:32:25 +0000 (13:32 +0000)
  exist at all.

[backport candidate]

ospfd/ChangeLog
ospfd/ospf_snmp.c

index 720826d3b2b5fe16d3cfc1186f1bb47eb18a8c64..f25e7c8a1fe0816058a5089f5b06162c1727d6d1 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-27 Hasso Tepper <hasso at quagga.net>
+
+       * ospf_snmp.c: Don't crash in snmp query if ospf instance doesn't
+         exist at all.
+
 2005-03-25 Hasso Tepper <hasso at quagga.net>
 
        * ospfd.h: Include log.h, fixes compile with gcc-4.0.
index 0cf257da4dee0f726307240d39fc1ffbe23fcdf3..c1994ab423f5daf6f6425710b84801ad2d1d10a2 100644 (file)
@@ -2130,6 +2130,9 @@ ospfNbrLookup (struct variable *v, oid *name, size_t *length,
 
   ospf = ospf_lookup ();
 
+  if (! ospf)
+    return NULL;
+
   if (exact)
     {
       if (*length != v->namelen + IN_ADDR_SIZE + 1)