summaryrefslogtreecommitdiff
path: root/proto/bgp
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-06-12 16:35:42 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-06-12 16:37:12 +0200
commitd35fb9d732b05f20a556e9bda798939358459975 (patch)
tree43c24345f60db040537d009324bb34219f657d08 /proto/bgp
parentdbbe4a783b3d4e7722bcb466673f8a1d2832fc7b (diff)
BGP: Fix bug introduced in one of last patches
Diffstat (limited to 'proto/bgp')
-rw-r--r--proto/bgp/bgp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index c8aeb292..470c6ff5 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -1998,8 +1998,10 @@ bgp_reconfigure(struct proto *P, struct proto_config *CF)
OFFSETOF(struct bgp_config, password) - sizeof(struct proto_config))
&& ((!old->password && !new->password)
|| (old->password && new->password && !strcmp(old->password, new->password)))
- && net_equal(old->remote_range, new->remote_range)
- && !strcmp(old->dynamic_name, new->dynamic_name)
+ && ((!old->remote_range && !new->remote_range)
+ || (old->remote_range && new->remote_range && net_equal(old->remote_range, new->remote_range)))
+ && ((!old->dynamic_name && !new->dynamic_name)
+ || (old->dynamic_name && new->dynamic_name && !strcmp(old->dynamic_name, new->dynamic_name)))
&& (old->dynamic_name_digits == new->dynamic_name_digits);
/* FIXME: Move channel reconfiguration to generic protocol code ? */