mirror of
https://github.com/soypat/lneto.git
synced 2026-09-04 05:49:02 +00:00
fix: clean up misc TODO comments and improve UDP source filtering (#89)
- http/httpraw: cap header slice growth to pre-allocated capacity, fix benchmark to reuse Header across iterations (0 allocs/op) - internal/ring: replace TODO panic comments with invariant explanations - tcp/conn: document truncated-frame offset check - tcp/handler: replace TODO with net.ErrClosed on RST-closed connection - internet/stack-udpport: filter incoming packets by remote IP address when configured via SetStackNode; skip filter for IPv4 multicast destinations (class D) so mDNS and similar protocols work correctly Generated with LLM assistance. Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
This commit is contained in:
@@ -297,7 +297,9 @@ func newMDNSStack(t *testing.T, hostname string, seed int64,
|
||||
t.Fatal(hostname, "mdns configure:", err)
|
||||
}
|
||||
|
||||
err = stack.RegisterUDP4(&client, addr.As4(), mdns.Port)
|
||||
var remote [4]byte
|
||||
copy(remote[:], mdnsCfg.MulticastAddr)
|
||||
err = stack.RegisterUDP4(&client, remote, mdns.Port)
|
||||
if err != nil {
|
||||
t.Fatal(hostname, "register udp:", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user