]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BMP: Fix reconfiguration
authorOndrej Zajicek <santiago@crfreenet.org>
Tue, 18 Apr 2023 16:57:54 +0000 (18:57 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 18 Apr 2023 16:57:54 +0000 (18:57 +0200)
It is not supported, but at least it must update internal config
pointer to not keep old one.

proto/bmp/bmp.c

index 23e250f8b4c8359c56009d72e887163d30ddfcbf..0ef13cd41b00045a75b2e102948d3410435e7542 100644 (file)
@@ -1131,10 +1131,16 @@ bmp_shutdown(struct proto *P)
 }
 
 static int
-bmp_reconfigure(struct proto *P UNUSED, struct proto_config *CF UNUSED)
+bmp_reconfigure(struct proto *P, struct proto_config *CF)
 {
+  struct bmp_proto *p = (void *) P;
+  const struct bmp_config *cf = (void *) CF;
+
   log(L_WARN "Reconfiguring BMP is not supported");
-  return PS_UP;
+
+  p->cf = cf;
+
+  return 1;
 }
 
 struct protocol proto_bmp = {