firewall: Keep conntrack entries per peer and recheck them when a peer reconnects

This commit is contained in:
JackDoan committed 2026-10-16 13:41:25 -05:00
1 parent bbc49669b7
commit a0045aef09
6 files changed
+202 -37

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ func newFixedTicker(t *testing.T, l *slog.Logger, cacheLen int) *ConntrackCacheT
cache: make(ConntrackCache, cacheLen),
}
for i := range cacheLen {
c.cache[Packet{LocalPort: uint16(i) + 1}] = struct{}{}
c.cache[ConntrackKey{Packet: Packet{LocalPort: uint16(i) + 1}}] = struct{}{}
}
c.cacheTick.Store(1) // cacheV starts at 0, so Get() takes the reset path
return c