summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--netboot/netboot.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/netboot/netboot.go b/netboot/netboot.go
index c88cb44..97a3240 100644
--- a/netboot/netboot.go
+++ b/netboot/netboot.go
@@ -87,7 +87,9 @@ func ConversationToNetconf(conversation []dhcpv6.DHCPv6) (*NetConf, string, erro
return nil, "", errors.New("no bootfile URL option found in ADVERTISE")
}
}
- obf := opt.(*dhcpv6.OptBootFileURL)
- bootfile = string(obf.BootFileURL)
+ if opt != nil {
+ obf := opt.(*dhcpv6.OptBootFileURL)
+ bootfile = string(obf.BootFileURL)
+ }
return netconf, bootfile, nil
}