-
Notifications
You must be signed in to change notification settings - Fork 790
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
fix(dhcp): can not renew an ip address #1092
fix(dhcp): can not renew an ip address #1092
Conversation
I don't know how to set to using unicast address, but it just work
|
778a06d
to
7961199
Compare
We can't just edit vendor files; they need to exactly match upstream. If our library has a bug, we should ideally fix that or find a new library. |
Oh, I didn't realize that was vendor code. Since the upstream code has been inactive for 6 years, What do you think? Any other good ideas? |
@lisongmin sounds good! If it's a difficult replacement, let me know and we can consider forking. But in general, it's better to switch to a supported upstream :-). |
37c0092
to
8d7931d
Compare
89be595
to
8a624c9
Compare
Main changed in this PR:
|
It seems there is a test error, but not relative to this PR:
|
40b11ca
to
87db4f5
Compare
I looked into it, I will try to fix it soon. An issue has been created: #1096 |
87db4f5
to
ba43c52
Compare
I have rebased to the latest code, feel free to have a look at it, thanks. |
@lisongmin looks good! Just needs a minor rebase, then we can get this in. |
The dhcp server is systemd-networkd, and the dhcp plugin can request an ip but can not renew it. The systemd-networkd just ignore the renew request. ``` 2024/09/14 21:46:00 no DHCP packet received within 10s 2024/09/14 21:46:00 retrying in 31.529038 seconds 2024/09/14 21:46:42 no DHCP packet received within 10s 2024/09/14 21:46:42 retrying in 63.150490 seconds 2024/09/14 21:47:45 98184616c91f15419f5cacd012697f85afaa2daeb5d3233e28b0ec21589fb45a/iot/eth1: no more tries 2024/09/14 21:47:45 98184616c91f15419f5cacd012697f85afaa2daeb5d3233e28b0ec21589fb45a/iot/eth1: renewal time expired, rebinding 2024/09/14 21:47:45 Link "eth1" down. Attempting to set up 2024/09/14 21:47:45 98184616c91f15419f5cacd012697f85afaa2daeb5d3233e28b0ec21589fb45a/iot/eth1: lease rebound, expiration is 2024-09-14 22:47:45.309270751 +0800 CST m=+11730.048516519 ``` Follow the https://datatracker.ietf.org/doc/html/rfc2131#section-4.3.6, following options must not be sent in renew - Requested IP Address - Server Identifier Since the upstream code has been inactive for 6 years, we should switch to another dhcpv4 library. The new selected one is https://github.com/insomniacslk/dhcp. Signed-off-by: Songmin Li <lisongmin@protonmail.com>
Signed-off-by: Songmin Li <lisongmin@protonmail.com>
ba43c52
to
f6326c5
Compare
Great to hear that. And the rebase is done. |
The dhcp server is systemd-networkd, and the dhcp
plugin can request an ip but can not renew it.
The systemd-networkd just ignore the renew request.
Follow the https://datatracker.ietf.org/doc/html/rfc2131#section-4.3.6, following options must not be sent in renew
And renew should using unicast but not broadcast.