diff options
author | Pablo Mazzini <pmazzini@gmail.com> | 2018-10-16 11:33:18 +0100 |
---|---|---|
committer | insomniac <insomniacslk@users.noreply.github.com> | 2018-10-16 11:33:18 +0100 |
commit | 5a743fadfa9e98fdca5deaef45e1114b273981ab (patch) | |
tree | 5083983290a73515c990e974322ccecbbfe441ca /dhcpv6/option_prefixdelegation_test.go | |
parent | 12c15033719dec9aa6415b3c0e25c1fcd97cba42 (diff) |
OptIAPrefix: sub-options (#177)
Diffstat (limited to 'dhcpv6/option_prefixdelegation_test.go')
-rw-r--r-- | dhcpv6/option_prefixdelegation_test.go | 7 |
1 files changed, 4 insertions, 3 deletions
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} |