mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-13 00:49:07 +02:00
[client] pqkem: document SignalOffer's error-marker return contract
SignalOffer now returns a non-empty error marker together with a non-nil error when the offer build fails; the host must still send that payload rather than dropping it, or an empty MlkemPayload would be read as the non-capable signal. State this in the doc comment. Found in cubic review on #7098 (client/internal/pqkem/manager.go:366).
This commit is contained in:
@@ -323,6 +323,10 @@ func (m *Manager) Stop() {
|
|||||||
// initiator. It is idempotent for an in-flight bootstrap: a repeat call returns the
|
// initiator. It is idempotent for an in-flight bootstrap: a repeat call returns the
|
||||||
// same offer rather than starting a new exchange.
|
// same offer rather than starting a new exchange.
|
||||||
//
|
//
|
||||||
|
// On a build failure it returns a non-nil error AND a non-empty error-marker payload:
|
||||||
|
// the host must still send that payload, because an empty MlkemPayload is the "peer does
|
||||||
|
// not run the KEM" capability signal, which would wrongly mark this peer non-capable.
|
||||||
|
//
|
||||||
// A signal re-negotiation always re-bootstraps (fresh exchange): the remote may have
|
// A signal re-negotiation always re-bootstraps (fresh exchange): the remote may have
|
||||||
// restarted and lost its PSK, so reusing a locally frozen one would desync. The derived
|
// restarted and lost its PSK, so reusing a locally frozen one would desync. The derived
|
||||||
// PSK still survives idle in the manager (dropped only on account-level peer removal),
|
// PSK still survives idle in the manager (dropped only on account-level peer removal),
|
||||||
|
|||||||
Reference in New Issue
Block a user