summaryrefslogtreecommitdiffstats
path: root/proto
diff options
context:
space:
mode:
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)