mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-21 21:09:07 +02:00
When every offer of a data-path rotation was lost, the initiator dropped the exchange and logged that it would retry next cycle. It never did: a rekey only chains a new rotation from an exchange awaiting it, and none was left. Rotation stopped until the next Signal re-bootstrap (a lazy wake, or never on a long-lived connection), and because no further attempt ran, the consecutive-failure count could not reach the threshold that hands recovery to the host either (reported in the security review of #7098). On a rotation timeout, hand the chain back to the exchange the rotation acknowledged. The next rekey then starts a fresh rotation from it: if the offer was simply lost both peers still hold that PSK and the rotation converges, and if the responder had already moved on, the attempts keep failing until the threshold triggers a re-bootstrap. A timed-out bootstrap is still dropped, as it has nothing to fall back to.