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 473ccad..fd2ac47 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;