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
zero seconds timeout after sending DHCP REQUEST #1154
Comments
If I got the code correctly, the whole DHCP negotiation has a common timeout of 5 seconds. Thats not enough for dnsmasq. It runs a pretty time-consuming neighbor detection to make sure the IP address it offers is not in use yet. Maybe the DHCP REQUEST could get its own timeout? |
As far as I understand the code, the intended retransmission scheme for every request is 5 tries with a delay of However, the current implementation is definitely flawed. After each sent message the code simply blocks on a condvar with a timeout of I've pushed a possible fix for this to the 1154-dhcp-retransmits branch. Please let me know if that works for you. |
Sure, stay tuned. FTR, increasing DHCP_TRIES to 10 seems to work. Since the reboot last night (including this change) DHCP did not run into a timeout anymore. Before I had about 90 to 100 incidents per day. |
Your new patch looks much better. I have the impression that the whole DHCP negotiation is much faster now, but of course load is still low after the restart. This is what I see in charon.log:
I will keep it running. Tomorrow I can say if DHCP ran into some timeouts. Stay tuned. |
I guess it increases the chances that the original code actually waits long enough to receive a response, but it definitely doesn't fix the issue and might only cause additional messages to get sent to the DHCP server. And with the new code it would increase the maximum total timeout to 55 seconds, which is too long in relation to the default half-open SA timeout.
Maybe because there are now less requests sent.
OK, if you hurry, we might be able to squeeze this fix into the upcoming release. |
Of course DHCP_TRIES is back to the default for the patched version I am running now. It will be enrolled on our major VPN gateway this night. Its great that this change made it into 5.9.7. Thank you very much |
System (please complete the following information):
Describe the bug
Sometimes the dhcp plugin runs into a timeout without waiting, as it seems. Sample from my charon.log:
Look at the clock entries. Apparently the dhcp plugin did not wait for the DHCP_REQUEST to succeed. Maybe dnsmasq could be granted a few seconds to process the request?
Additional context
dns and dhcp are provided by dnsmasq 2.85 running on localhost.
dhcp.conf:
The text was updated successfully, but these errors were encountered: