]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixed bug related to reconfiguration of BGP with MD5 passwords.
authorOndrej Zajicek <santiago@crfreenet.org>
Thu, 9 Jul 2009 13:42:39 +0000 (15:42 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Thu, 9 Jul 2009 13:42:39 +0000 (15:42 +0200)
proto/bgp/bgp.c

index a6b9d5740e96e9bc60dd5bf5cabe9fb31ace5ed5..0c8ee6daa7abe396f348d9764cf233541761939c 100644 (file)
@@ -927,7 +927,10 @@ bgp_reconfigure(struct proto *P, struct proto_config *C)
 
   int same = !memcmp(((byte *) old) + sizeof(struct proto_config),
                     ((byte *) new) + sizeof(struct proto_config),
-                    sizeof(struct bgp_config) - sizeof(struct proto_config));
+                    // password item is last and must be checked separately
+                    OFFSETOF(struct bgp_config, password) - sizeof(struct proto_config))
+    && ((!old->password && !new->password)
+       || (old->password && new->password && !strcmp(old->password, new->password)));
 
   /* We should update our copy of configuration ptr as old configuration will be freed */
   if (same)