Sending DHCP message when DHCP-Message-Type = 0

Sergey Korobkov sergey at orbita.dp.ua
Mon Aug 17 11:36:27 CEST 2009


Using version from GIT.
When DHCP-Message-Type = 0 the server must not sending reply.
But in this code set DHCP-Message-Type value from 0 to 1024 and reply sending 
to client.

src/main/dhcpd.c
...
        vp = pairfind(request->reply->vps, DHCP2ATTR(53)); /* 
DHCP-Message-Type */
        if (vp) {
                request->reply->code = vp->vp_integer;
                if (request->reply->code < PW_DHCP_OFFSET) {
                        request->reply->code += PW_DHCP_OFFSET;
                }
        }
...

I think it must be something like this:

        if (vp) {
                request->reply->code = vp->vp_integer;
                if ((request->reply->code < PW_DHCP_OFFSET) && 
(request->reply->code != 0)) {
                        request->reply->code += PW_DHCP_OFFSET;
                }
        }





More information about the Freeradius-Users mailing list