]> git.proxmox.com Git - mirror_frr.git/commitdiff
ospf6d: fix crash if zebra_interface_state_read can't find interface
authorIngo Flaschberger <if@xip.at>
Mon, 4 Apr 2011 10:17:45 +0000 (11:17 +0100)
committerPaul Jakma <paul@quagga.net>
Mon, 4 Apr 2011 10:17:45 +0000 (11:17 +0100)
* ospf6_zebra.c: (ospf6_zebra_if_state_update) zebra_interface_state_read
  may return NULL, if it can't find an interface, deal with it.

ospf6d/ospf6_zebra.c

index 0a8ac3e4fde74792dcd8a5a876159eb3e7323d92..881771a7f4d921464798a92d9dc811e820cb9a3f 100644 (file)
@@ -132,6 +132,9 @@ ospf6_zebra_if_state_update (int command, struct zclient *zclient,
   struct interface *ifp;
 
   ifp = zebra_interface_state_read (zclient->ibuf);
+  if (ifp == NULL)
+    return 0;
+  
   if (IS_OSPF6_DEBUG_ZEBRA (RECV))
     zlog_debug ("Zebra Interface state change: "
                 "%s index %d flags %llx metric %d mtu %d",