You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
There are following lines of code inside module dhcp.c in functions send_DHCP_DISCOVER() and send_DHCP_REQUEST() :
// host name
pDHCPMSG->OPT[k++] = hostName;
pDHCPMSG->OPT[k++] = 0; // fill zero length of hostname
for(i = 0 ; HOST_NAME[i] != 0; i++)
pDHCPMSG->OPT[k++] = HOST_NAME[i];
pDHCPMSG->OPT[k++] = DHCP_CHADDR[3];
pDHCPMSG->OPT[k++] = DHCP_CHADDR[4];
pDHCPMSG->OPT[k++] = DHCP_CHADDR[5];
pDHCPMSG->OPT[k - (i+3+1)] = i+3; // length of hostname
This code adds the last three bytes of the MAC address to the constant DCHP_HOST_NAME, which in sum forms the full DHCP host name. The problem may occur if MAC address contains bytes smaller than 0x20. Some routers (for example, Zyxel Keenetic Omni II) in this case cease to display the page with DHCP clients list at all.
I propose to replace the above code with the following:
Per Wiznet/ioLibrary_Driver#23 the DHCP host name needs to be ASCII chars.
This was actually fixed in WIZ550S2E, but was overwritten when the ioLibrary was merged at r1.1.0.
Bringing back the original fix, which uses sprintf to create valid names.
Spelling fixes
Removed duplicate call to setSIPR(zeroip); as per Wiznet/ioLibrary_Driver#45
Hi.
There are following lines of code inside module dhcp.c in functions send_DHCP_DISCOVER() and send_DHCP_REQUEST() :
This code adds the last three bytes of the MAC address to the constant DCHP_HOST_NAME, which in sum forms the full DHCP host name. The problem may occur if MAC address contains bytes smaller than 0x20. Some routers (for example, Zyxel Keenetic Omni II) in this case cease to display the page with DHCP clients list at all.
I propose to replace the above code with the following:
and to add function NibbleToHex():
The text was updated successfully, but these errors were encountered: