• AVR Freaks

Hot!DHCP code update causes assigned IP change

Author
mautry
New Member
  • Total Posts : 17
  • Reward points : 0
  • Joined: 2018/05/16 06:59:19
  • Location: 0
  • Status: offline
2018/09/18 08:31:13 (permalink)
0

DHCP code update causes assigned IP change

I noted that the latest (2.06) harmony DHCP module is causing IP changes on systems with DHCP server reserve IPs against MACs.  It appears to be caused by the ClientId option.  I modified this option to remove the stack index that appears to be tacked on to the hardware id, but that did not help either.  Is just having this option going to cause DHCP servers to allocate new IPs?  We have many systems in the field with reserved IPs on the DHCP servers and this is going to cause problems if we are going to have to reserve them all again.
#1

1 Reply Related Threads

    rainad
    Moderator
    • Total Posts : 1209
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: DHCP code update causes assigned IP change 2018/09/21 10:20:33 (permalink)
    0
    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.
     
    #2
    Jump to:
    © 2019 APG vNext Commercial Version 4.5