From 44e3365d4fa2db501e846bfce662bdf8b20fb808 Mon Sep 17 00:00:00 2001 From: JackDoan Date: Tue, 20 Oct 2026 15:47:43 -0500 Subject: [PATCH] Size send failure heads from the header length and tolerate a missing lighthouse --- hostmap.go | 2 +- overlay/batch/tx_batch.go | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hostmap.go b/hostmap.go index 49fecb5e..6dd29807 100644 --- a/hostmap.go +++ b/hostmap.go @@ -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 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 return } diff --git a/overlay/batch/tx_batch.go b/overlay/batch/tx_batch.go index 14a58ba4..5984997c 100644 --- a/overlay/batch/tx_batch.go +++ b/overlay/batch/tx_batch.go @@ -1,11 +1,15 @@ package batch -import "net/netip" +import ( + "net/netip" + + "github.com/slackhq/nebula/header" +) const SendBatchCap = 128 // 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. type batchWriter interface {