]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg/Ip6Dxe: Fix the bug when checking the DataSize
authorJiaxin Wu <jiaxin.wu@intel.com>
Wed, 16 Aug 2017 06:16:44 +0000 (14:16 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Thu, 17 Aug 2017 00:18:27 +0000 (08:18 +0800)
During setting the DnsServer, the DataSize check is incorrect.
This patch is to fix the issue.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c

index 61418e2b9058140cee0324c4e32d507193c0f9be..f4b9374da2d0c85e3688fce47f28fe2e2c3e67db 100644 (file)
@@ -1466,7 +1466,7 @@ Ip6ConfigSetDnsServer (
   Item   = NULL;\r
   Tmp    = NULL;\r
 \r
-  if ((DataSize == 0) && (DataSize % sizeof (EFI_IPv6_ADDRESS) != 0)) {\r
+  if ((DataSize != 0) && (DataSize % sizeof (EFI_IPv6_ADDRESS) != 0)) {\r
     return EFI_BAD_BUFFER_SIZE;\r
   }\r
 \r