Pull request: 3443 dhcp broadcast
Merge in DNS/adguard-home from 3443-fix-wired-dhcp to master Updates #3443. Squashed commit of the following: commit ec7c3b73e274ba7c05c5856cb2f4ea218ad46870 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Sep 7 18:21:07 2021 +0300 dhcpd: imp docs & naming commit d87c646af44d837c81aa032e82aad846bde97bc8 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Sep 7 16:56:36 2021 +0300 dhcpd: fix build tags & log changes commit cbd0b3c1aa0efb32aeaa9130111719ab3861e817 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Sep 7 16:26:50 2021 +0300 dhcpd: revert 3443 & imp broadcasting
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/aghtest"
|
||||
"github.com/AdguardTeam/golibs/netutil"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
@@ -136,3 +137,12 @@ func TestNormalizeLeases(t *testing.T) {
|
||||
assert.Equal(t, leases[1].HWAddr, staticLeases[1].HWAddr)
|
||||
assert.Equal(t, leases[2].HWAddr, dynLeases[1].HWAddr)
|
||||
}
|
||||
|
||||
// cloneUDPAddr returns a deep copy of a.
|
||||
func cloneUDPAddr(a *net.UDPAddr) (copy *net.UDPAddr) {
|
||||
return &net.UDPAddr{
|
||||
IP: netutil.CloneIP(a.IP),
|
||||
Port: a.Port,
|
||||
Zone: a.Zone,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user