]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Babel: Remove interfaces on shutdown
authorMaria Matejka <mq@ucw.cz>
Mon, 25 Sep 2023 07:31:18 +0000 (09:31 +0200)
committerMaria Matejka <mq@ucw.cz>
Mon, 25 Sep 2023 07:31:18 +0000 (09:31 +0200)
This avoids calling interface timer between Babel going
PS_DOWN and finally cleaning up the resource pool.

proto/babel/babel.c

index decaa407f4ec862bd472c4e9c5418d5e5c86d404..27ec478471b6136c2b1b55e9503aef57a6fd4c19 100644 (file)
@@ -2550,8 +2550,11 @@ babel_shutdown(struct proto *P)
 
   TRACE(D_EVENTS, "Shutdown requested");
 
-  WALK_LIST(ifa, p->interfaces)
+  WALK_LIST_FIRST(ifa, p->interfaces)
+  {
     babel_iface_shutdown(ifa);
+    babel_remove_iface(p, ifa);
+  }
 
   return PS_DOWN;
 }