claude first stab and first cleanup - ugh

This commit is contained in:
Jay Wren
2025-10-22 16:49:26 -04:00
parent 770147264d
commit 484de41b58
15 changed files with 1415 additions and 2326 deletions

View File

@@ -33,8 +33,7 @@ func (f *Interface) consumeInsidePacket(packet []byte, fwPacket *firewall.Packet
// routes packets from the Nebula addr to the Nebula addr through the Nebula
// TUN device.
if immediatelyForwardToSelf {
_, err := f.readers[q].Write(packet)
if err != nil {
if err := f.writeTun(q, packet); err != nil {
f.l.WithError(err).Error("Failed to forward to tun")
}
}
@@ -91,8 +90,7 @@ func (f *Interface) rejectInside(packet []byte, out []byte, q int) {
return
}
_, err := f.readers[q].Write(out)
if err != nil {
if err := f.writeTun(q, out); err != nil {
f.l.WithError(err).Error("Failed to write to tun")
}
}