[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).
This commit is contained in:
riccardom
2026-10-09 09:50:47 +02:00
parent 25893d233c
commit f660e2e578
+4 -2
View File
@@ -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