diff options
Diffstat (limited to 'netboot/netboot.go')
-rw-r--r-- | netboot/netboot.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/netboot/netboot.go b/netboot/netboot.go index 97a3240..81ba144 100644 --- a/netboot/netboot.go +++ b/netboot/netboot.go @@ -50,7 +50,7 @@ func ConversationToNetconf(conversation []dhcpv6.DHCPv6) (*NetConf, string, erro var reply dhcpv6.DHCPv6 for _, m := range conversation { // look for a REPLY - if m.Type() == dhcpv6.REPLY { + if m.Type() == dhcpv6.MessageTypeReply { reply = m break } @@ -67,14 +67,14 @@ func ConversationToNetconf(conversation []dhcpv6.DHCPv6) (*NetConf, string, erro opt dhcpv6.Option bootfile string ) - opt = reply.GetOneOption(dhcpv6.OPT_BOOTFILE_URL) + opt = reply.GetOneOption(dhcpv6.OptionBootfileURL) if opt == nil { log.Printf("no bootfile URL option found in REPLY, looking for it in ADVERTISE") // as a fallback, look for bootfile URL in the advertise var advertise dhcpv6.DHCPv6 for _, m := range conversation { // look for an ADVERTISE - if m.Type() == dhcpv6.ADVERTISE { + if m.Type() == dhcpv6.MessageTypeAdvertise { advertise = m break } @@ -82,7 +82,7 @@ func ConversationToNetconf(conversation []dhcpv6.DHCPv6) (*NetConf, string, erro if advertise == nil { return nil, "", errors.New("no ADVERTISE found") } - opt = advertise.GetOneOption(dhcpv6.OPT_BOOTFILE_URL) + opt = advertise.GetOneOption(dhcpv6.OptionBootfileURL) if opt == nil { return nil, "", errors.New("no bootfile URL option found in ADVERTISE") } |