]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: stop crash on process termination due to stale ifp->node
authorDon Slice <dslice@cumulusnetworks.com>
Tue, 18 Apr 2017 12:11:32 +0000 (08:11 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 18 Apr 2017 13:46:19 +0000 (09:46 -0400)
Problem reported that crash occurred when stopping quagga in certain
circumstances.  Determined that this was due to a stale pointer on the
ifp for a deleted interface.  The ifp->node had been freed but the ifp
still kept a pointer to it, and when later the process was stopped, it
attempted to delete it again.

Ticket: CM-15550
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/interface.c

index 1d015e858859e11213483b2f7584d7af8fff0829..1eefe1339ce74998ffcd9219563208d5b50353dc 100644 (file)
@@ -691,6 +691,7 @@ if_delete_update (struct interface *ifp)
      for setting ifindex to IFINDEX_INTERNAL after processing the
      interface deletion message. */
   ifp->ifindex = IFINDEX_INTERNAL;
+  ifp->node = NULL;
 }
 
 /* VRF change for an interface */