diff options
author | Christopher Koch <c@chrisko.ch> | 2019-01-20 20:13:51 +0000 |
---|---|---|
committer | insomniac <insomniacslk@users.noreply.github.com> | 2019-01-26 23:34:26 +0000 |
commit | da69dad309583925ff4f8d0454bd0fb5bb6a1402 (patch) | |
tree | 59ab134698084993a6254afe70ff8035b7b4f655 /dhcpv6/option_dnsrecursivenameserver_test.go | |
parent | 3478513076477d0f19eaeaf441f29949a9f6bc92 (diff) |
dhcpv6: move option code and length marshaling to Options.ToBytes.
Diffstat (limited to 'dhcpv6/option_dnsrecursivenameserver_test.go')
-rw-r--r-- | dhcpv6/option_dnsrecursivenameserver_test.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/dhcpv6/option_dnsrecursivenameserver_test.go b/dhcpv6/option_dnsrecursivenameserver_test.go index 1a56797..436cf2f 100644 --- a/dhcpv6/option_dnsrecursivenameserver_test.go +++ b/dhcpv6/option_dnsrecursivenameserver_test.go @@ -26,11 +26,7 @@ func TestOptDNSRecursiveNameServerToBytes(t *testing.T) { ns1 := net.ParseIP("2a03:2880:fffe:c:face:b00c:0:35") ns2 := net.ParseIP("2001:4860:4860::8888") nameservers := []net.IP{ns1, ns2} - expected := []byte{ - 0, 23, // OptionDNSRecursiveNameServer - 0, 32, // length - } - expected = append(expected, []byte(ns1)...) + expected := append([]byte{}, []byte(ns1)...) expected = append(expected, []byte(ns2)...) opt := OptDNSRecursiveNameServer{NameServers: nameservers} require.Equal(t, expected, opt.ToBytes()) |