From f660e2e578faeac75f841a08dae193da202b6964 Mon Sep 17 00:00:00 2001 From: riccardom Date: Fri, 9 Oct 2026 09:50:47 +0200 Subject: [PATCH] [client] peer: correct the MlkemPort zero-value comment Zero is the normal advertisement for a peer on the default PQ port (the port is omitted when it equals DefaultPort), not a signal that the peer does not run the exchange. Document zero as "assume DefaultPort" and point to the payload / capability state for whether ML-KEM is running. Found in cubic review on #7098 (client/internal/peer/handshaker.go:49). --- client/internal/peer/handshaker.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/internal/peer/handshaker.go b/client/internal/peer/handshaker.go index fe8d1d0ec..e81fc4cf5 100644 --- a/client/internal/peer/handshaker.go +++ b/client/internal/peer/handshaker.go @@ -45,8 +45,10 @@ type OfferAnswer struct { // when the peer does not run the ML-KEM PQ exchange. MlkemPayload []byte - // MlkemPort is the peer's ML-KEM PQ service UDP port (bound on its WG overlay - // IP) where data-path rekey messages are sent. Zero when not running the exchange. + // MlkemPort is the peer's ML-KEM PQ service UDP port (bound on its WG overlay IP) + // where data-path rekey messages are sent. Zero means "not explicitly advertised, + // assume DefaultPort" — it does NOT indicate whether the peer runs the exchange; + // that is told by the presence of MlkemPayload / the manager's capability state. MlkemPort uint16 // relay server address