]> git.proxmox.com Git - mirror_frr.git/commitdiff
Fix segfault when ospf6_create() is not called yet.
authorjardin <jardin>
Wed, 2 Mar 2005 22:43:26 +0000 (22:43 +0000)
committerjardin <jardin>
Wed, 2 Mar 2005 22:43:26 +0000 (22:43 +0000)
Thanks to Mohit Thakur.

ospf6d/ChangeLog
ospf6d/ospf6_zebra.c

index 38c74dc2c4cae62ca5a919b42c9077032adb2102..60519e64c4d30a473fca60d7b1a852d015f849bd 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-02 Vincent Jardin <Vincent.Jardin@6wind.com>
+
+       * ospf6_zebra.c: Fix core dump when router-id is provided with
+         an empty ospf6d.conf file (no context router ospf6) because
+         ospf6_create has not been called yet.
+
 2005-01-25 Paul Jakma <paul@dishone.st>
 
        * ospf6_asbr.c: Add "hsls" to the zroute_name const char array.
index bdd3babcc708190aa918f04eac3acfd715813ab1..bc15dff661f7e7ea6f20368ae372bf2969395508 100644 (file)
@@ -57,6 +57,9 @@ ospf6_router_id_update_zebra (int command, struct zclient *zclient,
   zebra_router_id_update_read(zclient->ibuf,&router_id);
   router_id_zebra = router_id.u.prefix4;
 
+  if (o == NULL)
+    return 0;
+
   if (o->router_id  == 0)
     o->router_id = (u_int32_t) router_id_zebra.s_addr;