]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
we no longer use packet->vector for anything DHCPv4
authorAlan T. DeKok <aland@freeradius.org>
Sun, 11 Aug 2024 19:34:47 +0000 (15:34 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 11 Aug 2024 19:34:47 +0000 (15:34 -0400)
src/protocols/dhcpv4/raw.c

index 695592a901431bbd5904f1e66d18b31e3613147a..b06c0d30bd24f71474616adfa5caed0d5795f6c9 100644 (file)
@@ -317,22 +317,6 @@ fr_packet_t *fr_dhcpv4_raw_packet_recv(int sockfd, struct sockaddr_ll *link_laye
 
        packet->code = code[2];
 
-       /*
-        *      Create a unique vector from the MAC address and the
-        *      DHCP opcode.  This is a hack for the RADIUS
-        *      infrastructure in the rest of the server.
-        *
-        *      Note: packet->data[2] == 6, which is smaller than
-        *      sizeof(packet->vector)
-        *
-        *      FIXME:  Look for client-identifier in packet,
-        *      and use that, too?
-        */
-       memset(packet->vector, 0, sizeof(packet->vector));
-       /* coverity[tainted_data] */
-       memcpy(packet->vector, packet->data + 28, packet->data[2]);
-       packet->vector[packet->data[2]] = packet->code & 0xff;
-
        packet->socket.inet.src_port = udp_src_port;
        packet->socket.inet.dst_port = udp_dst_port;