Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAK causes n_dhcp4_client_lease_select failure #30

Open
gotthardp opened this issue Mar 8, 2022 · 1 comment
Open

NAK causes n_dhcp4_client_lease_select failure #30

gotthardp opened this issue Mar 8, 2022 · 1 comment

Comments

@gotthardp
Copy link
Contributor

When the client is in STATE_RENEWING, there is a (current) probe->current_lease.
Now, when a NAK arrives the state changes (in n_dhcp4_client_probe_transition_nak) to STATE_INIT, retaining the current lease.
Then, once the DISCOVER-OFFER-REQUEST-ACK dance is over, the n_dhcp4_client_lease_select gets called. It checks the probe->current_lease is (still) not NULL and fails. The probe is not able to recover from this.

I wonder-- shouldn't be the probe->current_lease cleared in n_dhcp4_client_probe_transition_nak just like it is cleared in n_dhcp4_client_probe_transition_lifetime? Or should the custom code unref it prior calling the n_dhcp4_client_lease_select? (I will create a PR if you confirm this is a bug to be fixed here.)

@bengal
Copy link
Contributor

bengal commented Oct 2, 2022

Good catch, this was fixed in e4af932.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants