Re: DHCP code update causes assigned IP change
2018/09/21 10:20:33
(permalink)
Yes, this feature can be used by the DHCP servers to index in their data base and assign leases accordingly.
It's possible that using the "Option 61" can lead to new leases as opposed to when the option was not used.
If this is a problem then there are few ways of solving it, ranging from build time removing the option to run time callbacks, etc. But these are not available as we speak.
For now you can simply remove/comment out the corresponding line in dhcp.c:
static const TCPIP_DHCP_OPTION_WRITE_ENTRY _DHCPOptWriteTbl[] =
{
// Note: this table entries are processed in sequrntial order!
// option // write option function
{ /* TCPIP_DHCP_MESSAGE_TYPE */ _DHCPOptionWriteMsgType }, // always the 1st!
{ /* TCPIP_DHCP_SERVER_IDENTIFIER */ _DHCPOptionWriteSrvIdent },
{ /* TCPIP_DHCP_PARAM_REQUEST_LIST */ _DHCPOptionWriteParamRequest },
{ /* TCPIP_DHCP_PARAM_REQUEST_IP_ADDRESS */ _DHCPOptionWriteIPRequest },
{ /* TCPIP_DHCP_HOST_NAME */ _DHCPOptionHostName },
// { /* TCPIP_DHCP_PARAM_REQUEST_CLIENT_ID */ _DHCPOptionClientId },
{ /* TCPIP_DHCP_END_OPTION */ _DHCPOptionWriteEnd }, // always the last!
};
I think this will work.
Not a very elegant solution I know.
On the other hand there are so many DHCP options, I'm not convinced that it makes sense to have callback/selections for all of them.
I appreciate your feedback.