Skip to content

Fix long DHCP lease times #2601

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

Closed
wants to merge 2 commits into from
Closed

Fix long DHCP lease times #2601

wants to merge 2 commits into from

Conversation

chaveiro
Copy link
Contributor

@chaveiro chaveiro commented Feb 4, 2015

Fix for lease times > 7FFFFFFF seconds.
Forever lease time is unsigned long with value FFFFFFFF.
If lease time > 7FFFFFFF, calling Ethernet.maintain() would force a renew every time. That is wrong, overloads dhcp server and generates unnecessary network traffic.
Issue was described here: https://code.google.com/p/arduino/issues/detail?id=985

Fix for lease times > 7FFFFFFF seconds.
Forever lease time is unsigned long with value FFFFFFFF.
If lease time > 7FFFFFFF calling Ethernet.maintain() would force a renew every time that is wrong.
Issue was decribed here: https://code.google.com/p/arduino/issues/detail?id=985
@cmaglie cmaglie added Library: Ethernet The Ethernet Arduino library Type: Bug labels Feb 4, 2015
@cmaglie cmaglie self-assigned this Feb 4, 2015
@chaveiro
Copy link
Contributor Author

chaveiro commented Feb 4, 2015

This is fix for issues #985 and #2571

@Elijahg
Copy link

Elijahg commented Feb 14, 2015

This does _not_ fix #2571 entirely. It needs a fix in Dhcp.cpp too. (though something between 1.0.6 and 1.6 has broken the fix by SurferTim...)

@chaveiro
Copy link
Contributor Author

Please be specific what you mean by 'entirely'. My fix is for DHCP lease time.

chaveiro referenced this pull request Feb 15, 2015
Added fix by SurferTim to reply to the DHCP server with the current IP address instead of 0.0.0.0, and added fix by unknown user to fix lease renewal time.
cmaglie added a commit to cmaglie/Arduino that referenced this pull request Jun 4, 2015
The signed math doesn't handle correctly cases where the lease
time is set to infinity (0xFFFFFFFF).

Fixes arduino#2571
Fixes arduino#2601
Fixes arduino#2642
Fixes arduino#985
@cmaglie
Copy link
Member

cmaglie commented Jun 4, 2015

This has been included in #3287 please follow up there.

@cmaglie cmaglie closed this Jun 4, 2015
@cmaglie cmaglie added this to the Release 1.6.5 milestone Jun 4, 2015
cmaglie added a commit to cmaglie/Arduino that referenced this pull request Jul 14, 2015
The signed math doesn't handle correctly cases where the lease
time is set to infinity (0xFFFFFFFF).

Fixes arduino#2571
Fixes arduino#2601
Fixes arduino#2642
Fixes arduino#985
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Library: Ethernet The Ethernet Arduino library Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants