]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
If the TLVs are malformed, they're unknown
authorAlan T. DeKok <aland@freeradius.org>
Thu, 11 Jun 2015 15:41:33 +0000 (11:41 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 12 Jun 2015 15:09:45 +0000 (11:09 -0400)
src/modules/proto_dhcp/dhcp.c

index 473ccad1fbf7a0b8789ec48598e7fcdf2454f8d1..fd2ac47a5446fcc7af38675dd75c013a7ee82c27 100644 (file)
@@ -652,6 +652,7 @@ static int fr_dhcp_decode_vsa(TALLOC_CTX *ctx, VALUE_PAIR **tlv, uint8_t const *
        return 0;
 
 malformed:
+       pair2unknown(*tlv);
        pairmemcpy(*tlv, data, len);
 
        return 0;
@@ -806,6 +807,7 @@ static int fr_dhcp_decode_suboption(TALLOC_CTX *ctx, VALUE_PAIR **tlv, uint8_t c
        return 0;
 
 malformed:
+       pair2unknown(*tlv);
        pairmemcpy(*tlv, data, len);
 
        return 0;