0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00

Fixed bug related to reconfiguration of BGP with MD5 passwords.

This commit is contained in:
Ondrej Zajicek 2009-07-09 15:42:39 +02:00
parent dd7b4a1384
commit 70670bf317

View File

@ -927,7 +927,10 @@ bgp_reconfigure(struct proto *P, struct proto_config *C)
int same = !memcmp(((byte *) old) + sizeof(struct proto_config), int same = !memcmp(((byte *) old) + sizeof(struct proto_config),
((byte *) new) + 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 */ /* We should update our copy of configuration ptr as old configuration will be freed */
if (same) if (same)