diff --git a/dhcpv4/dhcpv4.go b/dhcpv4/dhcpv4.go index 2b9a2fc9..36c726f6 100644 --- a/dhcpv4/dhcpv4.go +++ b/dhcpv4/dhcpv4.go @@ -606,7 +606,7 @@ func (d *DHCPv4) NTPServers() []net.IP { // // The NetBIOS over TCP/IP Name Server option is described by RFC 2132, Section 8.5. func (d *DHCPv4) NetBIOSNameServers() []net.IP { - return GetIPs(OptionNetBIOSOverTCPIPNameServers, d.Options) + return GetIPs(OptionNetBIOSOverTCPIPNameServer, d.Options) } // DNS parses the DHCPv4 Domain Name Server option if present. diff --git a/dhcpv4/option_ips.go b/dhcpv4/option_ips.go index 2778e64d..cbb81a22 100644 --- a/dhcpv4/option_ips.go +++ b/dhcpv4/option_ips.go @@ -92,7 +92,7 @@ func OptNTPServers(ntpServers ...net.IP) Option { // The NetBIOS over TCP/IP Name Server option is described by RFC 2132, Section 8.5. func OptNetBIOSNameServers(netBIOSNameServers ...net.IP) Option { return Option{ - Code: OptionNetBIOSOverTCPIPNameServers, + Code: OptionNetBIOSOverTCPIPNameServer, Value: IPs(netBIOSNameServers), } } diff --git a/dhcpv4/option_ips_test.go b/dhcpv4/option_ips_test.go index 2d20a40b..3fb91a9a 100644 --- a/dhcpv4/option_ips_test.go +++ b/dhcpv4/option_ips_test.go @@ -71,9 +71,9 @@ func TestGetNTPServers(t *testing.T) { func TestOptNetBIOSNameServers(t *testing.T) { o := OptNetBIOSNameServers(net.IPv4(192, 168, 0, 1), net.IPv4(192, 168, 0, 10)) - require.Equal(t, OptionNetBIOSOverTCPIPNameServers, o.Code) + require.Equal(t, OptionNetBIOSOverTCPIPNameServer, o.Code) require.Equal(t, []byte{192, 168, 0, 1, 192, 168, 0, 10}, o.Value.ToBytes()) - require.Equal(t, "NetBIOS over TCP/IP Name Servers: 192.168.0.1, 192.168.0.10", o.String()) + require.Equal(t, "NetBIOS over TCP/IP Name Server: 192.168.0.1, 192.168.0.10", o.String()) } func TestGetNetBIOSNameServers(t *testing.T) { diff --git a/dhcpv4/types.go b/dhcpv4/types.go index 35f323d1..80ea49cf 100644 --- a/dhcpv4/types.go +++ b/dhcpv4/types.go @@ -180,7 +180,7 @@ const ( OptionNetworkInformationServers optionCode = 41 OptionNTPServers optionCode = 42 OptionVendorSpecificInformation optionCode = 43 - OptionNetBIOSOverTCPIPNameServers optionCode = 44 + OptionNetBIOSOverTCPIPNameServer optionCode = 44 OptionNetBIOSOverTCPIPDatagramDistributionServer optionCode = 45 OptionNetBIOSOverTCPIPNodeType optionCode = 46 OptionNetBIOSOverTCPIPScope optionCode = 47 @@ -345,7 +345,7 @@ var optionCodeToString = map[OptionCode]string{ OptionNetworkInformationServers: "Network Information Servers", OptionNTPServers: "NTP Servers", OptionVendorSpecificInformation: "Vendor Specific Information", - OptionNetBIOSOverTCPIPNameServers: "NetBIOS over TCP/IP Name Servers", + OptionNetBIOSOverTCPIPNameServer: "NetBIOS over TCP/IP Name Server", OptionNetBIOSOverTCPIPDatagramDistributionServer: "NetBIOS over TCP/IP Datagram Distribution Server", OptionNetBIOSOverTCPIPNodeType: "NetBIOS over TCP/IP Node Type", OptionNetBIOSOverTCPIPScope: "NetBIOS over TCP/IP Scope",