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