diff options
author | insomniac <insomniacslk@users.noreply.github.com> | 2018-08-15 14:01:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-15 14:01:33 +0100 |
commit | d13677dad515f3e103037c70c6102410d8f3fca0 (patch) | |
tree | 398eec6930715890d10cbd289926c502c05f312f /netboot | |
parent | e14f9e09d34be98fddb8686af726d7e6692f2e3b (diff) | |
parent | f479e18af71117de34cb44d0ffcc2b7b724488ce (diff) |
Merge pull request #137 from insomniacslk/netboot_withnetboot_duplicate
Fixing duplicate WithNetboot modifier in netboot package
Diffstat (limited to 'netboot')
-rw-r--r-- | netboot/netboot.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/netboot/netboot.go b/netboot/netboot.go index 81ba144..2f4cc8f 100644 --- a/netboot/netboot.go +++ b/netboot/netboot.go @@ -15,7 +15,6 @@ func RequestNetbootv6(ifname string, timeout time.Duration, retries int, modifie var ( conversation []dhcpv6.DHCPv6 ) - modifiers = append(modifiers, dhcpv6.WithNetboot) delay := 2 * time.Second for i := 0; i <= retries; i++ { log.Printf("sending request, attempt #%d", i+1) @@ -26,6 +25,9 @@ func RequestNetbootv6(ifname string, timeout time.Duration, retries int, modifie client := dhcpv6.NewClient() client.ReadTimeout = timeout + // WithNetboot is added only later, to avoid applying it twice (one + // here and one in the above call to NewSolicitForInterface) + modifiers = append(modifiers, dhcpv6.WithNetboot) conversation, err = client.Exchange(ifname, solicit, modifiers...) if err != nil { log.Printf("Client.Exchange failed: %v", err) |