diff options
-rw-r--r-- | dhcpv6/client.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/dhcpv6/client.go b/dhcpv6/client.go index caee751..8431482 100644 --- a/dhcpv6/client.go +++ b/dhcpv6/client.go @@ -58,14 +58,14 @@ func (c *Client) Exchange(ifname string, solicit DHCPv6, modifiers ...Modifier) } conversation = append(conversation, advertise) - // Decapsulate advertise if it's relayed before passing it to Request - if advertise.IsRelay() { - advertiseRelay := advertise.(*DHCPv6Relay) - advertise, err = advertiseRelay.GetInnerMessage() - if err != nil { - return conversation, err - } - } + // Decapsulate advertise if it's relayed before passing it to Request + if advertise.IsRelay() { + advertiseRelay := advertise.(*DHCPv6Relay) + advertise, err = advertiseRelay.GetInnerMessage() + if err != nil { + return conversation, err + } + } request, reply, err := c.Request(ifname, advertise, nil, modifiers...) if request != nil { conversation = append(conversation, request) |