]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
tweak verify function to make it more forgiving
authorAlan T. DeKok <aland@freeradius.org>
Thu, 9 Jul 2026 16:50:33 +0000 (12:50 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 9 Jul 2026 16:51:09 +0000 (12:51 -0400)
the various users of packet_ctx->duid already check it

src/protocols/dhcpv6/base.c
src/protocols/dhcpv6/dhcpv6.h

index 3f84ae2c091af113e2c38c6d0723a7b9354b13ff..440c45bcf9131b1c865bac6cc7282e46a8f8d26a 100644 (file)
@@ -611,8 +611,6 @@ bool fr_dhcpv6_verify(uint8_t const *packet, size_t packet_len, fr_dhcpv6_decode
         */
        if ((packet[0] == 0) || (packet[0] > FR_DHCPV6_LEASE_QUERY_REPLY)) return false;
 
-       if (!packet_ctx->duid) return false;
-
        if (from_server) return verify_to_client(packet, packet_len, packet_ctx);
 
        return verify_from_client(packet, packet_len, packet_ctx);
index c8eb3e6c090bc48d899e1e508608ef5b7f73d408..4a6ec3c3eaf0a39ea69aefc950772a339dccdbbb 100644 (file)
@@ -132,7 +132,7 @@ typedef struct {
 typedef struct {
        TALLOC_CTX              *tmp_ctx;               //!< for temporary things cleaned up during decoding
        uint32_t                transaction_id;         //!< previous transaction ID
-       uint8_t                 *duid;                  //!< the expected DUID, in wire format
+       uint8_t const           *duid;                  //!< the expected DUID, in wire format
        size_t                  duid_len;               //!< length of the expected DUID
 } fr_dhcpv6_decode_ctx_t;