The old code did not properly compare and update hostname strings,
causing BGP restarts during reconfigurations.
if (proto_get_router_id(CF) != p->local_id)
return 0;
- if (proto_get_hostname(CF) != p->hostname)
+ if (bstrcmp(proto_get_hostname(CF), p->hostname))
return 0;
int same = !memcmp(((byte *) old) + sizeof(struct proto_config),
/* We should update our copy of configuration ptr as old configuration will be freed */
p->cf = new;
+ p->hostname = proto_get_hostname(CF);
/* Check whether existing connections are compatible with required capabilities */
struct bgp_conn *ci = &p->incoming_conn;