Wednesday, May 07, 2025

Re: dhcpleased wrong DHO_DHCP_CLIENT_IDENTIFIER

Pretty sure this is a botched firmware upgrade for your modem.

rfc 6842 has this:
If the 'client identifier' option is present in a message received
from a client, the server MUST return the 'client identifier' option,
unaltered, in its response message.

But android and iphone do not care, so we can't care either.

Please try this

diff --git engine.c engine.c
index a2a5fdc859e..95121340c6c 100644
--- engine.c
+++ engine.c
@@ -1100,19 +1100,19 @@ parse_dhcp(struct dhcpleased_iface *iface, struct imsg_dhcp *dhcp)
rem -= dho_len;
break;
case DHO_DHCP_CLIENT_IDENTIFIER:
- /* the server is supposed to echo this back to us */
+ /*
+ * The server is supposed to echo this back to us
+ * (RFC6841), but of course they don't.
+ */
#ifndef SMALL
if (iface_conf != NULL && iface_conf->c_id_len > 0) {
if (dho_len != iface_conf->c_id[1]) {
log_warnx("wrong "
"DHO_DHCP_CLIENT_IDENTIFIER");
- return;
- }
- if (memcmp(p, &iface_conf->c_id[2], dho_len) !=
- 0) {
+ } else if (memcmp(p, &iface_conf->c_id[2],
+ dho_len) != 0) {
log_warnx("wrong "
"DHO_DHCP_CLIENT_IDENTIFIER");
- return;
}
} else

No comments:

Post a Comment