dhcp6: update after changes in insomniacslk/dhcp (#10)

This commit is contained in:
insomniac 2018-10-16 07:03:45 +01:00 committed by Michael Stapelberg
parent 81894ba0b3
commit cfbf52db6e

View File

@ -283,7 +283,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(time.Duration(o.T1) * time.Second)
if t1.Before(newCfg.RenewAfter) || newCfg.RenewAfter.IsZero() {
newCfg.RenewAfter = t1
}