summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang, Lubo <C:/Program Files (x86)/Git/o=Intel/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=Zhang, Lubob8d>2016-03-24 16:45:32 +0800
committerJeff Fan <jeff.fan@intel.com>2016-12-12 15:54:52 +0800
commitedf001e631b6912e741a0be930cde982a40c5a5e (patch)
tree22a453fcfd16110443b5323db30f1b26e38bcadb
parentfcf93f786111a74ad4b081125a657c9db92d053d (diff)
downloadedk2-edf001e631b6912e741a0be930cde982a40c5a5e.zip
edk2-edf001e631b6912e741a0be930cde982a40c5a5e.tar.gz
edk2-edf001e631b6912e741a0be930cde982a40c5a5e.tar.bz2
NetworkPkg:Fix bug when parsing the dhcp6 option 16
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> (cherry picked from commit 3decba3d32382e22357de4eb25da1aedf6462861)
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDhcp6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c
index 36f7cf8..38b8228 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c
@@ -251,8 +251,8 @@ HttpBootParseDhcp6Packet (
Option = Options[HTTP_BOOT_DHCP6_IDX_VENDOR_CLASS];
if (Option != NULL &&
- NTOHS(Option->OpLen) >= 10 &&
- CompareMem (Option->Data, DEFAULT_CLASS_ID_DATA, 10) == 0) {
+ NTOHS(Option->OpLen) >= 16 &&
+ CompareMem ((Option->Data + 6), DEFAULT_CLASS_ID_DATA, 10) == 0) {
IsHttpOffer = TRUE;
}