Reviewed-by: Hegde, Nagaraj P <nagaraj-p.he...@hpe.com>

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Zhang 
Lubo
Sent: Thursday, March 24, 2016 2:16 PM
To: edk2-devel@lists.01.org
Cc: Ye Ting <ting...@intel.com>; Fu Siyuan <siyuan...@intel.com>; Wu Jiaxin 
<jiaxin...@intel.com>
Subject: [edk2] [patch] 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...@intel.com>
Cc: Ye Ting <ting...@intel.com>
Cc: Wu Jiaxin <jiaxin...@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zh...@intel.com>
---
 NetworkPkg/HttpBootDxe/HttpBootDhcp6.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c 
b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c
index d2960e4..0157095 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c
@@ -249,12 +249,12 @@ HttpBootParseDhcp6Packet (
   // The offer with "HTTPClient" is a Http offer.
   //
   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;
   }
 
   //
   // The offer with Domain Server is a DNS offer.
--
1.9.5.msysgit.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to