Permalink
Browse files

FR-GV-206 - decode option 60 (string) not 63 (octets), and check length

  • Loading branch information...
alandekok committed Jul 3, 2017
1 parent fc8662d commit 5759b20af99af6d30924f0efd8da5eac2a17163d
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/modules/proto_dhcp/dhcp.c
@@ -1097,8 +1097,8 @@ int fr_dhcp_decode(RADIUS_PACKET *packet)
/*
* Vendor is "MSFT 98"
*/
vp = fr_pair_find_by_num(head, 63, DHCP_MAGIC_VENDOR, TAG_ANY);
if (vp && (strcmp(vp->vp_strvalue, "MSFT 98") == 0)) {
vp = fr_pair_find_by_num(head, 60, DHCP_MAGIC_VENDOR, TAG_ANY);
if (vp && (vp->vp_length >= 7) && (memcmp(vp->vp_octets, "MSFT 98", 7) == 0)) {
vp = fr_pair_find_by_num(head, 262, DHCP_MAGIC_VENDOR, TAG_ANY);

/*

0 comments on commit 5759b20

Please sign in to comment.