NetworkPkg/Ip6Dxe: Fix the bug when checking the DataSize

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>
This commit is contained in:
Jiaxin Wu 2017-08-16 14:16:44 +08:00
parent d75b8ac278
commit aa0f2bf7cc
1 changed files with 1 additions and 1 deletions

View File

@ -1466,7 +1466,7 @@ Ip6ConfigSetDnsServer (
Item = NULL;
Tmp = NULL;
if ((DataSize == 0) && (DataSize % sizeof (EFI_IPv6_ADDRESS) != 0)) {
if ((DataSize != 0) && (DataSize % sizeof (EFI_IPv6_ADDRESS) != 0)) {
return EFI_BAD_BUFFER_SIZE;
}