summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6
diff options
context:
space:
mode:
authorAndrea Barberio <insomniac@slackware.it>2019-04-03 15:45:37 +0100
committerinsomniac <insomniacslk@users.noreply.github.com>2019-04-03 16:22:26 +0100
commit625d653f51917b167cc2e53ef8fe595e85dd5fa4 (patch)
tree4e1c9bc4e54e6fa5468947d2e8d74caa9064f83b /dhcpv6
parent68ad1959024cccdfadb67ad56a9fc86cb18854d5 (diff)
Use cancellable crypto RNG from u-root
Fixes #246 Signed-off-by: Andrea Barberio <insomniac@slackware.it>
Diffstat (limited to 'dhcpv6')
-rw-r--r--dhcpv6/dhcpv6_test.go5
-rw-r--r--dhcpv6/dhcpv6message.go2
2 files changed, 3 insertions, 4 deletions
diff --git a/dhcpv6/dhcpv6_test.go b/dhcpv6/dhcpv6_test.go
index 166fa7d..d509572 100644
--- a/dhcpv6/dhcpv6_test.go
+++ b/dhcpv6/dhcpv6_test.go
@@ -1,16 +1,15 @@
package dhcpv6
import (
- "crypto/rand"
"encoding/binary"
"errors"
"net"
"testing"
+ "github.com/insomniacslk/dhcp/iana"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
-
- "github.com/insomniacslk/dhcp/iana"
+ "github.com/u-root/u-root/pkg/rand"
)
func randomReadMock(value []byte, n int, err error) func([]byte) (int, error) {
diff --git a/dhcpv6/dhcpv6message.go b/dhcpv6/dhcpv6message.go
index afd252d..9e03fa7 100644
--- a/dhcpv6/dhcpv6message.go
+++ b/dhcpv6/dhcpv6message.go
@@ -1,13 +1,13 @@
package dhcpv6
import (
- "crypto/rand"
"errors"
"fmt"
"net"
"time"
"github.com/insomniacslk/dhcp/iana"
+ "github.com/u-root/u-root/pkg/rand"
"github.com/u-root/u-root/pkg/uio"
)