Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dhcpd: fix windows; imp code
Browse files Browse the repository at this point in the history
ainar-g committed Mar 18, 2021
1 parent 5e56eeb commit 608dce2
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/dhcpd/bitset_test.go
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ func TestBitSet(t *testing.T) {
assert.True(t, ok)
})

t.Run("quick", func(t *testing.T) {
t.Run("compare_to_map", func(t *testing.T) {
m := map[uint64]struct{}{}
s := newBitSet()

2 changes: 2 additions & 0 deletions internal/dhcpd/v4.go
Original file line number Diff line number Diff line change
@@ -114,6 +114,8 @@ func (s *v4Server) GetLeases(flags int) (res []Lease) {
for _, l := range s.leases {
if getDynamic && l.Expiry.After(now) && !s.isBlocklisted(l) {
res = append(res, *l)

continue
}

if getStatic && l.IsStatic() {
2 changes: 1 addition & 1 deletion internal/dhcpd/v46_windows.go
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ type winServer struct{}

func (s *winServer) ResetLeases(leases []*Lease) {}
func (s *winServer) GetLeases(flags int) []Lease { return nil }
func (s *winServer) GetLeasesRef() []*Lease { return nil }
func (s *winServer) getLeasesRef() []*Lease { return nil }
func (s *winServer) AddStaticLease(lease Lease) error { return nil }
func (s *winServer) RemoveStaticLease(l Lease) error { return nil }
func (s *winServer) FindMACbyIP(ip net.IP) net.HardwareAddr { return nil }

0 comments on commit 608dce2

Please sign in to comment.