Skip to content

Commit

Permalink
dhcpd: fix windows; imp code
Browse files Browse the repository at this point in the history
  • Loading branch information
ainar-g committed Mar 18, 2021
1 parent 5e56eeb commit 608dce2
Show file tree
Hide file tree
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
Expand Up @@ -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()

Expand Down
2 changes: 2 additions & 0 deletions internal/dhcpd/v4.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion internal/dhcpd/v46_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit 608dce2

Please sign in to comment.