From 54c911b4349d9fc445ad10c5399db12a58dfcec9 Mon Sep 17 00:00:00 2001 From: Chris Koch Date: Mon, 10 Feb 2020 14:23:38 -0800 Subject: v6: add FQDN option getter Signed-off-by: Chris Koch --- dhcpv6/modifiers_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dhcpv6/modifiers_test.go') diff --git a/dhcpv6/modifiers_test.go b/dhcpv6/modifiers_test.go index ff8022c..e31cd29 100644 --- a/dhcpv6/modifiers_test.go +++ b/dhcpv6/modifiers_test.go @@ -90,8 +90,8 @@ func TestWithDomainSearchList(t *testing.T) { func TestWithFQDN(t *testing.T) { var d Message WithFQDN(4, "cnos.localhost")(&d) - require.Equal(t, 1, len(d.Options)) - ofqdn := d.Options[0].(*OptFQDN) + require.Equal(t, 1, len(d.Options.Options)) + ofqdn := d.Options.FQDN() require.Equal(t, OptionFQDN, ofqdn.Code()) require.Equal(t, uint8(4), ofqdn.Flags) require.Equal(t, "cnos.localhost", ofqdn.DomainName) -- cgit v1.2.3