dhcpv6: use new TransactionID type (#21)
This commit is contained in:
parent
a3799c4ec5
commit
ea50066bad
@ -45,8 +45,8 @@ type ClientConfig struct {
|
||||
// be able to carry it around between devices.
|
||||
DUID []byte
|
||||
|
||||
Conn net.PacketConn // for testing
|
||||
TransactionIDs []uint32 // for testing
|
||||
Conn net.PacketConn // for testing
|
||||
TransactionIDs []dhcpv6.TransactionID // for testing
|
||||
}
|
||||
|
||||
// Config contains the obtained network configuration.
|
||||
@ -67,7 +67,7 @@ type Client struct {
|
||||
err error
|
||||
|
||||
Conn net.PacketConn // TODO: unexport
|
||||
transactionIDs []uint32
|
||||
transactionIDs []dhcpv6.TransactionID
|
||||
|
||||
ReadTimeout time.Duration
|
||||
WriteTimeout time.Duration
|
||||
|
@ -22,6 +22,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/insomniacslk/dhcp/dhcpv6"
|
||||
"github.com/rtr7/router7/internal/testing/pcapreplayer"
|
||||
)
|
||||
|
||||
@ -46,9 +47,9 @@ func TestDHCP6(t *testing.T) {
|
||||
InterfaceName: "lo",
|
||||
LocalAddr: laddr,
|
||||
Conn: conn,
|
||||
TransactionIDs: []uint32{
|
||||
0x48e59e, // SOLICIT
|
||||
0x738c3b, // REQUEST
|
||||
TransactionIDs: []dhcpv6.TransactionID{
|
||||
{0x48, 0xe5, 0x9e}, // SOLICIT
|
||||
{0x73, 0x8c, 0x3b}, // REQUEST
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user