Files
nebula/handshake/handshake.proto
T
Wade Simmons b93c3bfed6 multiport: fix review findings in lane probing and recv_error
- Don't probe lanes on a tunnel idle in both directions, and don't count lane
  probes or their acks as tunnel traffic. A lane's own keepalive was keeping
  idle tunnels from ever being dropped by tunnels.drop_inactive.
- Accept a recv_error from an up lane's target. The peer answers lane traffic
  from the lane socket it arrived on, and the spoof guard only accepted the
  base remote, so recv_errors for lane traffic were ignored.
- Keep the probe generation across a lane reset, so an ack for a probe sent
  before a roam can't promote the lane on the new path.
- Bring handshake.proto in line with payload.go: field 3 is reserved and
  TxLanes is field 4.
2026-10-01 16:50:45 -05:00

46 lines
1.6 KiB
Protocol Buffer

// This file documents the wire format the nebula handshake speaks. It is
// not run through protoc; the encoder/decoder in payload.go is hand-written
// against this shape directly to keep the parser narrow and panic-free.
//
// Any change to the wire format must be reflected here, and adding a new
// field requires updating MarshalPayload / unmarshalPayloadDetails together
// with the field-uniqueness and wire-type checks in those functions.
syntax = "proto3";
package nebula.handshake;
message NebulaHandshake {
NebulaHandshakeDetails Details = 1;
bytes Hmac = 2;
}
message NebulaHandshakeDetails {
bytes Cert = 1;
uint32 InitiatorIndex = 2;
uint32 ResponderIndex = 3;
// Cookie was reserved for an anti-DoS mechanism that was never
// implemented. No released version of nebula has ever populated it; the
// hand-written parser silently skips it on read.
uint64 Cookie = 4 [deprecated = true];
uint64 Time = 5;
uint32 CertVersion = 8;
// reserved for WIP multiport
reserved 6, 7;
// Multiport lane negotiation. Absent on hosts without multiport enabled;
// vanilla nebula treats 9 and 10 as unknown fields and skips them.
LaneDetails InitiatorLanes = 9;
LaneDetails ResponderLanes = 10;
}
// LaneDetails advertises a host's multiport lane capability. PortCount/BasePort
// describe the sender's consecutively bound UDP ports, and TxLanes is how many
// lanes the sender may send on, so the peer knows how many lane sessions it must
// be prepared to receive on.
message LaneDetails {
uint32 PortCount = 1;
uint32 BasePort = 2;
// was a per-lane handshake index
reserved 3;
uint32 TxLanes = 4;
}