Skip to content

Commit

Permalink
dhcpsvc: fix interface to match legacy version
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneOne1 committed Sep 28, 2023
1 parent 5da513c commit 95bcf07
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/dhcpsvc/dhcpsvc.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ type Interface interface {
AddLease(l *Lease) (err error)

// UpdateStaticLease changes an existing DHCP lease. It returns an error if
// there is no lease equal to old or if new is invalid or already exists.
UpdateStaticLease(old, new *Lease) (err error)
// there is no lease with such hardware addressor if new values are invalid
// or already exist.
UpdateStaticLease(l *Lease) (err error)

// RemoveLease removes an existing DHCP lease. It returns an error if there
// is no lease equal to l.
Expand Down Expand Up @@ -112,7 +113,7 @@ func (Empty) Leases() (leases []*Lease) { return nil }
func (Empty) AddLease(_ *Lease) (err error) { return nil }

// UpdateStaticLease implements the [Interface] interface for Empty.
func (Empty) UpdateStaticLease(_, _ *Lease) (err error) { return nil }
func (Empty) UpdateStaticLease(_ *Lease) (err error) { return nil }

// RemoveLease implements the [Interface] interface for Empty.
func (Empty) RemoveLease(_ *Lease) (err error) { return nil }
Expand Down

0 comments on commit 95bcf07

Please sign in to comment.