Skip to content

Commit

Permalink
FR-GV-206 - decode option 60 (string) not 63 (octets), and check length
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Jul 17, 2017
1 parent fc8662d commit 5759b20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/proto_dhcp/dhcp.c
Expand Up @@ -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);

/*
Expand Down

0 comments on commit 5759b20

Please sign in to comment.