On Fri, Apr 09, 2021 at 09:41:24AM +0200, Florian Obser wrote:
> I think it would be better (and less ugly) to treat invalid values as
> if they had not been set. Could you pull the two checks up before
> if(renewal_time == 0) and do something like this:
> 
>       if (renewal_time >= rebinding_time) {
>               log_warn(...)
>               renewal_time = 0;
>       }
>       if (rebinding_time >= lease_time) {
>               log_warn(...)
>               rebinding_time = 0;
>       }
> 

It might even be better to ignore both values if at least one is
invalid.

if (renewal_time >= rebinding_time || rebinding_time >= lease_time) {
...

Since you are in there and have a device that causes trouble could you
give this a bit of thought? I'm currently swamped with other things
and won't have time until the evening.

-- 
I'm not entirely sure you are real.

Reply via email to