From 5a743fadfa9e98fdca5deaef45e1114b273981ab Mon Sep 17 00:00:00 2001 From: Pablo Mazzini Date: Tue, 16 Oct 2018 11:33:18 +0100 Subject: OptIAPrefix: sub-options (#177) --- dhcpv6/option_prefixdelegation_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'dhcpv6/option_prefixdelegation_test.go') diff --git a/dhcpv6/option_prefixdelegation_test.go b/dhcpv6/option_prefixdelegation_test.go index cb90e25..93044fe 100644 --- a/dhcpv6/option_prefixdelegation_test.go +++ b/dhcpv6/option_prefixdelegation_test.go @@ -1,6 +1,7 @@ package dhcpv6 import ( + "net" "testing" "github.com/stretchr/testify/require" @@ -106,10 +107,10 @@ func TestOptIAForPrefixDelegationDelOption(t *testing.T) { func TestOptIAForPrefixDelegationToBytes(t *testing.T) { oaddr := OptIAPrefix{} - oaddr.SetPreferredLifetime(0xaabbccdd) - oaddr.SetValidLifetime(0xeeff0011) + oaddr.PreferredLifetime = 0xaabbccdd + oaddr.ValidLifetime = 0xeeff0011 oaddr.SetPrefixLength(36) - oaddr.SetIPv6Prefix([16]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}) + oaddr.SetIPv6Prefix(net.IPv6loopback) opt := OptIAForPrefixDelegation{} opt.IaId = [4]byte{1, 2, 3, 4} -- cgit v1.2.3