diff options
author | Andrea Barberio <insomniac@slackware.it> | 2018-07-16 15:40:31 +0100 |
---|---|---|
committer | Andrea Barberio <insomniac@slackware.it> | 2018-07-16 15:40:31 +0100 |
commit | 2562408546198f3dbe97e7329ccb86c16a6f304b (patch) | |
tree | 72e881d4c93b5a577bfc5cd1dccc5b041c5b5275 | |
parent | 2dcf990d80650504c2610f03ccafb284a8ca93ae (diff) |
Netboot: don't fail if no netboot url is returned
-rw-r--r-- | netboot/netboot.go | 6 |
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 } |