mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-17 01:36:52 +01:00
udp: Buffer a fragmented handshake burst in the tester, so crossing bursts cannot deadlock the e2e router
This commit is contained in:
1 parent
3b850c6ecf
commit
cbf8146bda
1 file changed
+5
-2
+5
-2
@@ -85,8 +85,11 @@ type TesterConn struct {
|
|||||||
|
|
||||||
func NewListener(l *slog.Logger, s Settings) (Conn, error) {
|
func NewListener(l *slog.Logger, s Settings) (Conn, error) {
|
||||||
c := &TesterConn{
|
c := &TesterConn{
|
||||||
RxPackets: make(chan *Packet, 10),
|
// A fragmented handshake message is a burst of a dozen packets. The
|
||||||
TxPackets: make(chan *Packet, 10),
|
// router moves packets one at a time, so if both directions held fewer
|
||||||
|
// than a burst each, two bursts crossing would deadlock it.
|
||||||
|
RxPackets: make(chan *Packet, 64),
|
||||||
|
TxPackets: make(chan *Packet, 64),
|
||||||
done: make(chan struct{}),
|
done: make(chan struct{}),
|
||||||
l: l,
|
l: l,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user