]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
RPKI: Fix unnecessary reconnection on reconfiguration
authorKazuki Yamaguchi <k@rhe.jp>
Wed, 3 Jun 2020 13:05:35 +0000 (15:05 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Wed, 3 Jun 2020 13:05:35 +0000 (15:05 +0200)
Compare the new timing parameters with the old configuration, not with
the temporary state of the current connection.

The timing values in struct rpki_cache is updated by a version 1 End Of
Data PDU, unless this behavior is suppressed by the configuration
explicitly by the "keep" keyword. Consequently, every reconfiguration
of BIRD triggers a reconnection even if it is not necessary.

proto/rpki/rpki.c

index aa07f7d9d323208da2361e487f217980d2f0dcd9..3e46b6d197a8c0c573309adf2e02c7da1bdfccb2 100644 (file)
@@ -701,7 +701,7 @@ rpki_reconfigure_cache(struct rpki_proto *p UNUSED, struct rpki_cache *cache, st
 #endif
 
 #define TEST_INTERVAL(name, Name)                                              \
-    if (cache->name##_interval != new->name##_interval ||                      \
+    if (old->name##_interval != new->name##_interval ||                                \
        old->keep_##name##_interval != new->keep_##name##_interval)             \
     {                                                                          \
       cache->name##_interval = new->name##_interval;                           \