]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
If attr > 255 then it can't be 82
authorNick Porter <nick@portercomputing.co.uk>
Wed, 9 Oct 2024 08:12:56 +0000 (09:12 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Wed, 9 Oct 2024 08:13:52 +0000 (09:13 +0100)
src/protocols/dhcpv4/dhcpv4.h
src/protocols/dhcpv4/encode.c

index 194d3b4c060029b9c95abfaca98393c9152fc63a..c07028fbc6ca120972b6f3ec4b852f3375e822ee 100644 (file)
@@ -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)
 
index 6bb8d22c720817789f62861efd848d00b6a9318c..224d4b646bf24ee01a8232f7417d99da2e0c187e 100644 (file)
@@ -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);