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. Signed-off-by: Kazuki Yamaguchi <[email protected]> --- Hello, I reproduce the issue with the following simple RPKI protocol configuration, where "a-cache" is a Routinator which supports the RTR protocol version 1. roa4 table r4; roa6 table r6; protocol rpki { roa4 { table r4; }; roa6 { table r6; }; remote "a-cache" port 3323; debug all; } And "birdc config" causes a transport reconnection. 2020-06-03 13:59:20.085 <TRACE> rpki1: Received End of Data packet (session id: 17629, serial number: 639, refresh: 500s, retry: 600s, expire: 7200s) ... 2020-06-03 13:59:22.077 <INFO> Reconfiguring ... 2020-06-03 13:59:22.077 <TRACE> rpki1: Refresh interval changed to 3600 seconds 2020-06-03 13:59:22.077 <TRACE> rpki1: Changing from Established to Fast-Reconnect state Kazuki Yamaguchi proto/rpki/rpki.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/rpki/rpki.c b/proto/rpki/rpki.c index aa07f7d9d323..3e46b6d197a8 100644 --- a/proto/rpki/rpki.c +++ b/proto/rpki/rpki.c @@ -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; \ -- 2.27.0
