]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
If we have CHADDR, mark up htype and hlen
authorAlan T. DeKok <aland@freeradius.org>
Mon, 31 Aug 2015 12:19:42 +0000 (08:19 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 31 Aug 2015 12:19:42 +0000 (08:19 -0400)
src/modules/proto_dhcp/dhcp.c

index d7f2616a02d621d5ef39b8ee4337c9eaf5da8d0f..7561785c56d15f2d72e55bd3233911291eaaffd8 100644 (file)
@@ -1545,6 +1545,13 @@ int fr_dhcp_encode(RADIUS_PACKET *packet)
        /* DHCP-Client-Hardware-Address */
        if ((vp = fr_pair_find_by_num(packet->vps, 267, DHCP_MAGIC_VENDOR, TAG_ANY))) {
                if (vp->vp_length == sizeof(vp->vp_ether)) {
+                       /*
+                        *      Ensure that we mark the packet as being Ethernet.
+                        *      This is mainly for DHCP-Lease-Query responses.
+                        */
+                       packet->data[1] = 1;
+                       packet->data[2] = 6;
+
                        memcpy(p, vp->vp_ether, vp->vp_length);
                } /* else ignore it */
        }