]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BGP: Fix bug introduced in one of last patches
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Wed, 12 Jun 2019 14:35:42 +0000 (16:35 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Wed, 12 Jun 2019 14:37:12 +0000 (16:37 +0200)
proto/bgp/bgp.c

index c8aeb292c75f7412c6d87331ad6d19b7e7ed2b00..470c6ff52303484dcc95c41dd4d926683aba30d8 100644 (file)
@@ -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 ? */