From: Nick Porter Date: Wed, 9 Oct 2024 08:12:56 +0000 (+0100) Subject: If attr > 255 then it can't be 82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10b2de1c20acaa5636875071d45f8149714ae3a0;p=thirdparty%2Ffreeradius-server.git If attr > 255 then it can't be 82 --- diff --git a/src/protocols/dhcpv4/dhcpv4.h b/src/protocols/dhcpv4/dhcpv4.h index 194d3b4c060..c07028fbc6c 100644 --- a/src/protocols/dhcpv4/dhcpv4.h +++ b/src/protocols/dhcpv4/dhcpv4.h @@ -110,7 +110,6 @@ typedef struct { #define DHCP_FILE_FIELD (1) #define DHCP_SNAME_FIELD (2) -#define FR_DHCP_OPTION_82 (82) #define DHCP_PACK_OPTION1(x,y) ((x) | ((y) << 8)) #define DHCP_UNPACK_OPTION1(x) (((x) & 0xff00) >> 8) diff --git a/src/protocols/dhcpv4/encode.c b/src/protocols/dhcpv4/encode.c index 6bb8d22c720..224d4b646bf 100644 --- a/src/protocols/dhcpv4/encode.c +++ b/src/protocols/dhcpv4/encode.c @@ -735,7 +735,7 @@ ssize_t fr_dhcpv4_encode_option(fr_dbuff_t *dbuff, fr_dcursor_t *cursor, void *e if (!vp) return -1; if (vp->da == attr_dhcp_message_type) goto next; /* already done */ - if ((vp->da->attr > 255) && (vp->da->attr != FR_DHCP_OPTION_82)) { + if (vp->da->attr > 255) { fr_strerror_printf("Attribute \"%s\" is not a DHCP option", vp->da->name); next: (void)fr_dcursor_next(cursor);