diff --git a/internal/dhcpsvc/v4.go b/internal/dhcpsvc/v4.go index d3916e4ec3c..9967a589f72 100644 --- a/internal/dhcpsvc/v4.go +++ b/internal/dhcpsvc/v4.go @@ -30,8 +30,8 @@ type IPv4Config struct { RangeEnd netip.Addr // Options is the list of DHCP options to send to DHCP clients. The options - // with zero length are treated as deletions of the corresponding options, - // either implicit or explicit. + // having a zero value within the Length field are treated as deletions of + // the corresponding options, either implicit or explicit. Options layers.DHCPOptions // LeaseDuration is the TTL of a DHCP lease. @@ -130,6 +130,8 @@ func newIface4(name string, conf *IPv4Config) (i *iface4, err error) { // options returns the implicit and explicit options for the interface. The two // lists are disjoint and the implicit options are initialized with default // values. +// +// TODO(e.burkov): DRY with the IPv6 version. func (conf *IPv4Config) options() (implicit, explicit layers.DHCPOptions) { // Set default values of host configuration parameters listed in Appendix A // of RFC-2131. Keep the list sorted by option code for using the binary @@ -306,8 +308,8 @@ func (conf *IPv4Config) options() (implicit, explicit layers.DHCPOptions) { } } - log.Debug("dhcpv4: implicit options: %s", implicit) - log.Debug("dhcpv4: explicit options: %s", explicit) + log.Debug("dhcpsvc: v4: implicit options: %s", implicit) + log.Debug("dhcpsvc: v4: explicit options: %s", explicit) return implicit, explicit } diff --git a/internal/dhcpsvc/v6.go b/internal/dhcpsvc/v6.go index b74a5afbc35..39a8f008ab4 100644 --- a/internal/dhcpsvc/v6.go +++ b/internal/dhcpsvc/v6.go @@ -123,8 +123,8 @@ func (conf *IPv6Config) options() (implicit, explicit layers.DHCPv6Options) { explicit = append(explicit, exp) } - log.Debug("dhcpv6: implicit options: %s", implicit) - log.Debug("dhcpv6: explicit options: %s", explicit) + log.Debug("dhcpsvc: v6: implicit options: %s", implicit) + log.Debug("dhcpsvc: v6: explicit options: %s", explicit) return implicit, explicit }