summaryrefslogtreecommitdiffstats
path: root/proto
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-07-09 15:42:39 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2009-07-09 15:42:39 +0200
commit70670bf317a612a1700ffbd0dbc8d92614e0caf2 (patch)
tree73c9643b87cb65b6106ddc430597148f07153a98 /proto
parentdd7b4a13848f5a92b403a563e8e27a3cbdfc937f (diff)
downloadbird-70670bf317a612a1700ffbd0dbc8d92614e0caf2.tar
bird-70670bf317a612a1700ffbd0dbc8d92614e0caf2.zip
Fixed bug related to reconfiguration of BGP with MD5 passwords.
Diffstat (limited to 'proto')
-rw-r--r--proto/bgp/bgp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index a6b9d57..0c8ee6d 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -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)