]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Refactor fix - proto_reconfigure() update pointers
authorVojtech Vilimek <vojtech.vilimek@nic.cz>
Wed, 20 Jul 2022 14:54:23 +0000 (16:54 +0200)
committerVojtech Vilimek <vojtech.vilimek@nic.cz>
Wed, 20 Jul 2022 14:54:23 +0000 (16:54 +0200)
nest/proto.c

index 73f9263cb68306ee5715199a6475c3ce04ed4984..850cd596544a00ef05a18aa2b62152411aed5075 100644 (file)
@@ -947,6 +947,10 @@ channel_reconfigure(struct channel *c, struct channel_config *cf)
   c->in_req.trace_routes = c->out_req.trace_routes = c->debug | c->proto->debug;
   c->rpki_reload = cf->rpki_reload;
 
+  /* update pointers from config to channel and vice versa */
+  cf->channel = c;
+  c->config = cf;
+
   /* Execute channel-specific reconfigure hook */
   if (c->class->reconfigure && !c->class->reconfigure(c, cf, &import_changed, &export_changed))
     return 0;