summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/dhcpv4.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv4/dhcpv4.go')
-rw-r--r--dhcpv4/dhcpv4.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/dhcpv4/dhcpv4.go b/dhcpv4/dhcpv4.go
index eebc1b0..51621e9 100644
--- a/dhcpv4/dhcpv4.go
+++ b/dhcpv4/dhcpv4.go
@@ -327,11 +327,7 @@ func (d *DHCPv4) HwType() iana.HwTypeType {
// HwTypeToString returns the mnemonic name for the hardware type, e.g.
// "Ethernet". If the type is unknown, it returns "Unknown".
func (d *DHCPv4) HwTypeToString() string {
- hwtype, ok := iana.HwTypeToString[d.hwType]
- if !ok {
- hwtype = "Invalid"
- }
- return hwtype
+ return d.hwType.String()
}
// SetHwType returns the hardware type as defined by IANA.