mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-15 19:36:52 +01:00
Size send failure heads from the header length and tolerate a missing lighthouse
This commit is contained in:
1 parent
995f22ca53
commit
44e3365d4f
2 files changed
+7
-3
No files matched your search
+1
-1
@@ -783,7 +783,7 @@ func (i *HostInfo) remoteUnreachable(ifce *Interface, dead netip.AddrPort) {
|
|||||||
// Nothing to probe with, or we already moved on from the remote that failed
|
// Nothing to probe with, or we already moved on from the remote that failed
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if ifce.lightHouse.amLighthouse {
|
if ifce.lightHouse == nil || ifce.lightHouse.amLighthouse {
|
||||||
// A lighthouse hands out the address it reaches a client on, it must not go roaming its clients itself
|
// A lighthouse hands out the address it reaches a client on, it must not go roaming its clients itself
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
package batch
|
package batch
|
||||||
|
|
||||||
import "net/netip"
|
import (
|
||||||
|
"net/netip"
|
||||||
|
|
||||||
|
"github.com/slackhq/nebula/header"
|
||||||
|
)
|
||||||
|
|
||||||
const SendBatchCap = 128
|
const SendBatchCap = 128
|
||||||
|
|
||||||
// FailureHeadLen is how much of a refused packet a Failure keeps, nebula's header, which says whose packet it was
|
// FailureHeadLen is how much of a refused packet a Failure keeps, nebula's header, which says whose packet it was
|
||||||
const FailureHeadLen = 16
|
const FailureHeadLen = header.Len
|
||||||
|
|
||||||
// batchWriter is the minimal subset of udp.Conn needed by SendBatch to flush.
|
// batchWriter is the minimal subset of udp.Conn needed by SendBatch to flush.
|
||||||
type batchWriter interface {
|
type batchWriter interface {
|
||||||
|
|||||||
Reference in new issue
Block a user