浏览代码

fix(aerotun): permit IPv6 link-local source packets for Babel/routing protocols & auto-clear transient tunnel errors (v1.8.24)

- Permit IPv6 link-local unicast sources (fe80::/10) in AeroTUN allowedSource policy, allowing Babel (and OSPFv3/BFD/NDP) multicast & unicast exchanges over point-to-point tunnels without being dropped by source filtering
- Add auto-clearing of transient lastError on successful transmit & receive in TunnelRunner, ensuring CLI and UI state correctly report 'connected' rather than 'failed'
- Update allowed_ips to include ::/0 on AeroTUN tunnels for dual-stack routing
- Synchronize interface name on remote DebTik to at-Maiden2 matching dynamic routing templates
- Rebuild AMD64 and ARM64 binaries and bump version to v1.8.24
Proxmox Router 1 天之前
父节点
当前提交
fd868ebc7f
共有 8 个文件被更改,包括 12 次插入 和 2 次删除
  1. 1 1
      VERSION
  2. 二进制
      bin/debtik
  3. 二进制
      bin/debtik-arm64
  4. 二进制
      bin/debtik-cli
  5. 二进制
      bin/debtik-cli-arm64
  6. 5 0
      internal/aerotun/secure_io.go
  7. 1 1
      internal/aerotun/secure_protocol_test.go
  8. 5 0
      internal/aerotun/tunnel.go

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.8.23
+1.8.24

二进制
bin/debtik


二进制
bin/debtik-arm64


二进制
bin/debtik-cli


二进制
bin/debtik-cli-arm64


+ 5 - 0
internal/aerotun/secure_io.go

@@ -172,6 +172,7 @@ func (t *TunnelRunner) txLoopSecure() {
 				atomic.AddUint64(&t.compressedPackets, compressed)
 				atomic.AddUint64(&t.savedBytes, savedBytes)
 				atomic.AddUint64(&t.rawPackets, raw)
+				t.clearError()
 			}
 			sent += n
 			if err != nil || n == 0 {
@@ -198,6 +199,9 @@ func (t *TunnelRunner) allowedSource(b []byte) bool {
 		copy(ip[:], b[8:24])
 		src = netip.AddrFrom16(ip)
 	}
+	if src.IsLinkLocalUnicast() {
+		return true
+	}
 	for _, prefix := range t.allowed {
 		if prefix.Contains(src) {
 			return true
@@ -336,6 +340,7 @@ func (t *TunnelRunner) rxLoopSecure() {
 			atomic.AddUint64(&t.rxBytes, uint64(wrote))
 			atomic.AddUint64(&t.rawBytesIn, uint64(wrote))
 			atomic.AddUint64(&t.packetsRx, 1)
+			t.clearError()
 		}
 	}
 }

+ 1 - 1
internal/aerotun/secure_protocol_test.go

@@ -366,7 +366,7 @@ func TestSecureAllowedSourcePolicy(t *testing.T) {
 	for _, tc := range []struct {
 		source string
 		want   bool
-	}{{"2001:db8:42::1", true}, {"2001:db8:43::1", false}} {
+	}{{"2001:db8:42::1", true}, {"2001:db8:43::1", false}, {"fe80::1423:58a:b322:ae3a", true}} {
 		source := netip.MustParseAddr(tc.source).As16()
 		copy(v6[8:24], source[:])
 		if runner.allowedSource(v6) != tc.want {

+ 5 - 0
internal/aerotun/tunnel.go

@@ -151,6 +151,11 @@ func (t *TunnelRunner) setError(err error) {
 	t.lastError = err.Error()
 	t.mu.Unlock()
 }
+func (t *TunnelRunner) clearError() {
+	t.mu.Lock()
+	t.lastError = ""
+	t.mu.Unlock()
+}
 func (t *TunnelRunner) target() *net.UDPAddr {
 	t.mu.RLock()
 	defer t.mu.RUnlock()