]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg:Fix bug when parsing the dhcp6 option 16
authorZhang, Lubo <C:/Program Files (x86)/Git/o=Intel/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=Zhang, Lubob8d>
Thu, 24 Mar 2016 08:45:32 +0000 (16:45 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Fri, 25 Mar 2016 03:33:02 +0000 (11:33 +0800)
when to parse the DHCP6 reply packet,there will be 6
bytes offset before the option data according to
RFC 3315.

Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
NetworkPkg/HttpBootDxe/HttpBootDhcp6.c

index d2960e4f6c14a15858f40d447d8a3e02eee88df7..0157095edf821c4b89cd94a1edc205d18ebb5651 100644 (file)
@@ -251,8 +251,8 @@ HttpBootParseDhcp6Packet (
   Option = Options[HTTP_BOOT_DHCP6_IDX_VENDOR_CLASS];\r
 \r
   if (Option != NULL &&\r
-      NTOHS(Option->OpLen) >= 10 &&\r
-      CompareMem (Option->Data, DEFAULT_CLASS_ID_DATA, 10) == 0) {\r
+      NTOHS(Option->OpLen) >= 16 &&\r
+      CompareMem ((Option->Data + 6), DEFAULT_CLASS_ID_DATA, 10) == 0) {\r
       IsHttpOffer = TRUE;\r
   }\r
 \r