dhcpcd-discuss

Re: RENEW vs. BOUND

Roy Marples

Fri Feb 13 11:29:34 2015

Hi

On 13/02/2015 10:03, Olaf Westrik wrote:
> I have a question about commit 7dc0e4a12f (Fix transition from IPv4LL to
> a valid DHCP state)
> 
> Especially this change in dhcpcd.c
> 
> @@ -1923,9 +1921,9 @@
>          eloop_exit(ifp->ctx->eloop, EXIT_SUCCESS);
>          return;
>      }
>      if (state->reason == NULL) {
> -        if (state->old) {
> +        if (state->old && state->new->cookie != htonl(MAGIC_COOKIE)) {
>              if (state->old->yiaddr == state->new->yiaddr &&
>                  lease->server.s_addr)
>                  state->reason = "RENEW";
>              else
> 
> 
> The effect I see is that every RENEW in my environment is now reported
> as BOUND, because new->cookie equals the magic cookie. The code
> This differs from previous behaviour.
> Is this expected/wanted?

Good spot!
While this shouldn't break anything, it's not desirable either.
Fixed here:
http://roy.marples.name/projects/dhcpcd/ci/25e8e4b75a58502b689662d7d30c9be35ecb7623?sbs=0

Thanks

Roy

Follow-Ups:
Re: RENEW vs. BOUNDOlaf Westrik
References:
RENEW vs. BOUNDOlaf Westrik
Archive administrator: postmaster@marples.name