diff options
author | Jiaxin Wu <jiaxin.wu@intel.com> | 2017-08-16 14:16:44 +0800 |
---|---|---|
committer | Jiaxin Wu <jiaxin.wu@intel.com> | 2017-08-17 08:18:27 +0800 |
commit | aa0f2bf7cc879dc732164d1ea003b53e244c2ff4 (patch) | |
tree | 77db0d2626071f172b13719ad744261fb9d3a7b3 | |
parent | d75b8ac278bc9f0159aa7eb9a92fd2cc87a18d8c (diff) | |
download | edk2-aa0f2bf7cc879dc732164d1ea003b53e244c2ff4.zip edk2-aa0f2bf7cc879dc732164d1ea003b53e244c2ff4.tar.gz edk2-aa0f2bf7cc879dc732164d1ea003b53e244c2ff4.tar.bz2 |
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>
-rw-r--r-- | NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c index 61418e2..f4b9374 100644 --- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c +++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c @@ -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;
}
|