From: Alan T. DeKok Date: Mon, 31 Aug 2015 12:19:42 +0000 (-0400) Subject: If we have CHADDR, mark up htype and hlen X-Git-Tag: release_3_0_10~190 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7668e91cb0d263a888508d4cd9a44f8b39a68d74;p=thirdparty%2Ffreeradius-server.git If we have CHADDR, mark up htype and hlen --- diff --git a/src/modules/proto_dhcp/dhcp.c b/src/modules/proto_dhcp/dhcp.c index d7f2616a02d..7561785c56d 100644 --- a/src/modules/proto_dhcp/dhcp.c +++ b/src/modules/proto_dhcp/dhcp.c @@ -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 */ }