summaryrefslogtreecommitdiffhomepage
path: root/netboot
diff options
context:
space:
mode:
authorChristopher Koch <chrisko@google.com>2019-02-28 13:44:56 -0800
committerinsomniac <insomniacslk@users.noreply.github.com>2019-03-11 21:54:10 -0700
commit5073ba65eb176fae79fdca21f28728a0c2c4ca19 (patch)
treed617173503f875ab6294ce870a93ac7a9b56c2f6 /netboot
parent5859695ac2f7e59f6a7de0a0353aa1e1f19aa6aa (diff)
dhcpv6: rename stuttering types.
dhcpv6.DHCPv6Message -> dhcpv6.Message dhcpv6.DHCPv6Relay -> dhcpv6.RelayMessage
Diffstat (limited to 'netboot')
-rw-r--r--netboot/netboot.go2
-rw-r--r--netboot/netconf.go2
-rw-r--r--netboot/netconf_test.go4
3 files changed, 4 insertions, 4 deletions
diff --git a/netboot/netboot.go b/netboot/netboot.go
index 15990b1..0b854c6 100644
--- a/netboot/netboot.go
+++ b/netboot/netboot.go
@@ -93,7 +93,7 @@ func ConversationToNetconf(conversation []dhcpv6.DHCPv6) (*NetConf, string, erro
if reply == nil {
return nil, "", errors.New("no REPLY received")
}
- netconf, err := GetNetConfFromPacketv6(reply.(*dhcpv6.DHCPv6Message))
+ netconf, err := GetNetConfFromPacketv6(reply.(*dhcpv6.Message))
if err != nil {
return nil, "", fmt.Errorf("cannot get netconf from packet: %v", err)
}
diff --git a/netboot/netconf.go b/netboot/netconf.go
index d05fa80..0f40e26 100644
--- a/netboot/netconf.go
+++ b/netboot/netconf.go
@@ -31,7 +31,7 @@ type NetConf struct {
// GetNetConfFromPacketv6 extracts network configuration information from a DHCPv6
// Reply packet and returns a populated NetConf structure
-func GetNetConfFromPacketv6(d *dhcpv6.DHCPv6Message) (*NetConf, error) {
+func GetNetConfFromPacketv6(d *dhcpv6.Message) (*NetConf, error) {
opt := d.GetOneOption(dhcpv6.OptionIANA)
if opt == nil {
return nil, errors.New("No option IA NA found")
diff --git a/netboot/netconf_test.go b/netboot/netconf_test.go
index 5e954fa..b267101 100644
--- a/netboot/netconf_test.go
+++ b/netboot/netconf_test.go
@@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/require"
)
-func getAdv(modifiers ...dhcpv6.Modifier) *dhcpv6.DHCPv6Message {
+func getAdv(modifiers ...dhcpv6.Modifier) *dhcpv6.Message {
hwaddr, err := net.ParseMAC("aa:bb:cc:dd:ee:ff")
if err != nil {
log.Panic(err)
@@ -31,7 +31,7 @@ func getAdv(modifiers ...dhcpv6.Modifier) *dhcpv6.DHCPv6Message {
if err != nil {
log.Panic(err)
}
- adv := d.(*dhcpv6.DHCPv6Message)
+ adv := d.(*dhcpv6.Message)
return adv
}