mirror of
https://github.com/soypat/lneto.git
synced 2026-08-17 21:24:04 +00:00
fix couple bugs in ARP and add benchmarks
This commit is contained in:
@@ -450,6 +450,17 @@ func (s *StackAsync) ResultResolveHardwareAddress6(ip netip.Addr) (hw [6]byte, e
|
||||
return [6]byte(hwslice), nil
|
||||
}
|
||||
|
||||
// DiscardResolveHardwareAddress6 discards a pending ARP query for the given IP address.
|
||||
func (s *StackAsync) DiscardResolveHardwareAddress6(ip netip.Addr) error {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
if !ip.Is4() {
|
||||
return errors.New("unsupported or invalid IP address")
|
||||
}
|
||||
addr := ip.As4()
|
||||
return s.arp.DiscardQuery(addr[:])
|
||||
}
|
||||
|
||||
type DHCPResults struct {
|
||||
DNSServers []netip.Addr
|
||||
Router netip.Addr
|
||||
|
||||
Reference in New Issue
Block a user