µTasker Forum

µTasker Forum => µTasker general => Topic started by: alager on August 03, 2010, 06:24:25 PM

Title: DHCP fails when using option overload 52
Post by: alager on August 03, 2010, 06:24:25 PM
Mark,

We found a router, Netgear FVS318, that is sending option 52 and thus causing utasker dhcp to fail.
The cause of the failure is that in fnDoRxDHCP() the case issues a return instead of a break:
Code: [Select]
case DHCP_OPT_OVERLOAD:
                        return NO_SUPPORT_FOR_DHCP_OVERLOAD;             // we don't process overload messages

Because of the return, we never get to the line that saves the offered IP:
Code: [Select]
uMemcpy(ucDHCP_IP, usOfferedIP, IPV4_LENGTH);                // save the offered IP
Can the overload just be ignored, and use a break?  Or is there some better way of handling this case?

Thanks,
Aaron
Title: Re: DHCP fails when using option overload 52
Post by: mark on August 03, 2010, 08:29:41 PM
Hi Aaron

I have seen this before and have removed the check completely, controlled by a define in case it should be blocked:

#if !defined ALLOW_OVERLOAD_OPTIONS                                      // {3}
                    case DHCP_OPT_OVERLOAD:
                        return NO_SUPPORT_FOR_DHCP_OVERLOAD;             // we don't process overload messages
#endif


Note that there are tow occurrences of this check.

I think that it is the same as having

                    case DHCP_OPT_OVERLOAD:
                        break;

but saves the need for an empty case.

Regards

Mark

P.S. This should be activated in the latest release (14.10.2009   Allow overload options to be tolerated, but not handled  {3})