diff options
author | Sean Karlage <skarlage@fb.com> | 2018-08-11 14:30:48 -0700 |
---|---|---|
committer | Sean Karlage <skarlage@fb.com> | 2018-08-11 14:32:26 -0700 |
commit | 8ea2525c898436a2a935580de67727bbe7035c85 (patch) | |
tree | 69d35d17c238feabb07ef07a907aae5520104911 /dhcpv6/utils.go | |
parent | 2b05c7d03724d31529886d98f738499ac06ead7e (diff) | |
parent | a6212f1f72e94821a29894fb66656a981bd035d0 (diff) |
Merge branch 'master' into dhcpv4-moar-tests
Diffstat (limited to 'dhcpv6/utils.go')
-rw-r--r-- | dhcpv6/utils.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dhcpv6/utils.go b/dhcpv6/utils.go index b1c0b93..1681661 100644 --- a/dhcpv6/utils.go +++ b/dhcpv6/utils.go @@ -11,14 +11,14 @@ import ( // if the "boot file" option is included in the packet, which is useful for // ADVERTISE/REPLY packet. func IsNetboot(msg DHCPv6) bool { - for _, optoro := range msg.GetOption(OPTION_ORO) { + for _, optoro := range msg.GetOption(OptionORO) { for _, o := range optoro.(*OptRequestedOption).RequestedOptions() { - if o == OPT_BOOTFILE_URL { + if o == OptionBootfileURL { return true } } } - if optbf := msg.GetOneOption(OPT_BOOTFILE_URL); optbf != nil { + if optbf := msg.GetOneOption(OptionBootfileURL); optbf != nil { return true } return false @@ -42,14 +42,14 @@ func IsUsingUEFI(msg DHCPv6) bool { // 7 EFI BC // 8 EFI Xscale // 9 EFI x86-64 - if opt := msg.GetOneOption(OPTION_CLIENT_ARCH_TYPE); opt != nil { + if opt := msg.GetOneOption(OptionClientArchType); opt != nil { optat := opt.(*OptClientArchType) // TODO investigate if other types are appropriate if optat.ArchType == EFI_BC || optat.ArchType == EFI_X86_64 { return true } } - if opt := msg.GetOneOption(OPTION_USER_CLASS); opt != nil { + if opt := msg.GetOneOption(OptionUserClass); opt != nil { optuc := opt.(*OptUserClass) for _, uc := range optuc.UserClasses { if strings.Contains(string(uc), "EFI") { |