summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorinsomniac <insomniacslk@users.noreply.github.com>2018-07-16 15:52:14 +0100
committerGitHub <noreply@github.com>2018-07-16 15:52:14 +0100
commit633285ba52b2a67b98a3026eb87ee1a76ab60f3c (patch)
tree72e881d4c93b5a577bfc5cd1dccc5b041c5b5275
parent2dcf990d80650504c2610f03ccafb284a8ca93ae (diff)
parent2562408546198f3dbe97e7329ccb86c16a6f304b (diff)
Merge pull request #86 from insomniacslk/netboot_no_url_no_fail
Netboot: don't fail if no netboot url is returned
-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
}