Pull request: dhcpd: add purge, imp code
Updates #1691. Squashed commit of the following: commit 2ce6cc005d09ac7d63e4e575705d86e92046697f Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Jun 16 16:42:57 2021 +0300 dhcp: imp code commit 8f2bd7048d864e10aaed9e7338c0bbe852699a31 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Jun 16 16:27:06 2021 +0300 dhcpd: add purge, imp code
This commit is contained in:
@@ -993,15 +993,14 @@ type testDHCP struct{}
|
||||
|
||||
func (d *testDHCP) Enabled() (ok bool) { return true }
|
||||
|
||||
func (d *testDHCP) Leases(flags int) []dhcpd.Lease {
|
||||
l := dhcpd.Lease{
|
||||
func (d *testDHCP) Leases(flags dhcpd.GetLeasesFlags) (leases []*dhcpd.Lease) {
|
||||
return []*dhcpd.Lease{{
|
||||
IP: net.IP{192, 168, 12, 34},
|
||||
HWAddr: net.HardwareAddr{0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA},
|
||||
Hostname: "myhost",
|
||||
}
|
||||
|
||||
return []dhcpd.Lease{l}
|
||||
}}
|
||||
}
|
||||
|
||||
func (d *testDHCP) SetOnLeaseChanged(onLeaseChanged dhcpd.OnLeaseChangedT) {}
|
||||
|
||||
func TestPTRResponseFromDHCPLeases(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user