summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPablo Mazzini <pmazzini@gmail.com>2018-11-18 12:28:04 +0000
committerPablo Mazzini <pmazzini@gmail.com>2018-11-18 12:28:04 +0000
commit70409af21497e0d61e42e48e718b1f2b68e1ce84 (patch)
treeb8c2cec64b0ba5302a67251898570630dfc1b3da
parentd9eb0ae23f15e432e607fb18ffa21d886957821b (diff)
iputils: add ExtractMAC
-rw-r--r--dhcpv6/iputils_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/dhcpv6/iputils_test.go b/dhcpv6/iputils_test.go
index 82a9a39..d2d8a95 100644
--- a/dhcpv6/iputils_test.go
+++ b/dhcpv6/iputils_test.go
@@ -138,6 +138,8 @@ func Test_ExtractMAC(t *testing.T) {
}
solicit, err := NewMessage(WithClientID(duid))
require.NoError(t, err)
- mac, err = ExtractMAC(solicit)
+ relay, err := EncapsulateRelay(solicit, MessageTypeRelayForward, net.IPv6zero, net.IPv6zero)
+ require.NoError(t, err)
+ mac, err = ExtractMAC(relay)
require.Equal(t, mac.String(), "aa:aa:aa:aa:aa:aa")
}