ethernet: MTU semantic meaning corrections, add FCS logic (#28)

This commit is contained in:
Pat Whittingslow
2026-01-26 16:45:35 -03:00
committed by GitHub
parent 6a6097a9ac
commit 85f018a02c
10 changed files with 241 additions and 25 deletions
+2
View File
@@ -325,6 +325,8 @@ func (s *StackAsync) StartLookupIP(host string) error {
return err
}
// EDNS0 buffer size: MTU minus overhead for IP+UDP headers and safety margin.
// 100 bytes covers IPv4 max header (60) + UDP (8) + 32 byte margin.
s.ednsopt.SetEDNS0(uint16(s.link.MTU())-100, 0, 0, nil)
rand := s.prand32()
err = s.dns.StartResolve(uint16(rand>>1)+1024, uint16(rand), dns.ResolveConfig{