diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c index 61418e2b90..f4b9374da2 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; }