dhcp6: T1 is now already a time.Duration

see https://github.com/insomniacslk/dhcp/pull/347
This commit is contained in:
Michael Stapelberg 2020-01-03 08:06:17 +01:00
parent 3b5cf99b29
commit 73bd5c6a50

View File

@ -280,7 +280,7 @@ func (c *Client) ObtainOrRenew() bool {
for _, opt := range reply.Options {
switch o := opt.(type) {
case *dhcpv6.OptIAForPrefixDelegation:
t1 := c.timeNow().Add(time.Duration(o.T1) * time.Second)
t1 := c.timeNow().Add(o.T1)
if t1.Before(newCfg.RenewAfter) || newCfg.RenewAfter.IsZero() {
newCfg.RenewAfter = t1
}