summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv6/client.go')
-rw-r--r--dhcpv6/client.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/dhcpv6/client.go b/dhcpv6/client.go
index f46854c..3e79a0a 100644
--- a/dhcpv6/client.go
+++ b/dhcpv6/client.go
@@ -44,17 +44,21 @@ func (c *Client) Exchange(ifname string, solicit DHCPv6) ([]DHCPv6, error) {
// Solicit
solicit, advertise, err := c.Solicit(ifname, solicit)
+ if solicit != nil {
+ conversation = append(conversation, solicit)
+ }
if err != nil {
return conversation, err
}
- conversation = append(conversation, solicit)
conversation = append(conversation, advertise)
request, reply, err := c.Request(ifname, advertise, nil)
+ if request != nil {
+ conversation = append(conversation, request)
+ }
if err != nil {
return conversation, err
}
- conversation = append(conversation, request)
conversation = append(conversation, reply)
return conversation, nil
}