Discussion:
[edk2] [Patch] NetworkPkg: Add the unspecified address check for DNS6 StationIp.
Jiaxin Wu
2015-07-15 04:13:54 UTC
Permalink
Add the unspecified address check for DNS6 StationIp,
so the underlying driver will choose the source address.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <***@intel.com>
---
NetworkPkg/DnsDxe/DnsProtocol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/NetworkPkg/DnsDxe/DnsProtocol.c b/NetworkPkg/DnsDxe/DnsProtocol.c
index eafa929..70857c2 100644
--- a/NetworkPkg/DnsDxe/DnsProtocol.c
+++ b/NetworkPkg/DnsDxe/DnsProtocol.c
@@ -872,11 +872,11 @@ Dns6Configure (
Instance->State = DNS_STATE_UNCONFIGED;
} else {
//
// Configure the parameters for new operation.
//
- if (!NetIp6IsValidUnicast (&DnsConfigData->StationIp)) {
+ if (!NetIp6IsUnspecifiedAddr (&DnsConfigData->StationIp) && !NetIp6IsValidUnicast (&DnsConfigData->StationIp)) {
Status = EFI_INVALID_PARAMETER;
goto ON_EXIT;
}

Status = Dns6CopyConfigure (&Instance->Dns6CfgData, DnsConfigData);
--
1.9.5.msysgit.1
Ye, Ting
2015-07-15 08:49:41 UTC
Permalink
Looks good.

Reviewed-by: Ye Ting <***@intel.com>

-----Original Message-----
From: Wu, Jiaxin
Sent: Wednesday, July 15, 2015 12:14 PM
To: edk2-***@lists.sourceforge.net; Ye, Ting; Fu, Siyuan
Subject: [Patch] NetworkPkg: Add the unspecified address check for DNS6 StationIp.

Add the unspecified address check for DNS6 StationIp,
so the underlying driver will choose the source address.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <***@intel.com>
---
NetworkPkg/DnsDxe/DnsProtocol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/NetworkPkg/DnsDxe/DnsProtocol.c b/NetworkPkg/DnsDxe/DnsProtocol.c
index eafa929..70857c2 100644
--- a/NetworkPkg/DnsDxe/DnsProtocol.c
+++ b/NetworkPkg/DnsDxe/DnsProtocol.c
@@ -872,11 +872,11 @@ Dns6Configure (
Instance->State = DNS_STATE_UNCONFIGED;
} else {
//
// Configure the parameters for new operation.
//
- if (!NetIp6IsValidUnicast (&DnsConfigData->StationIp)) {
+ if (!NetIp6IsUnspecifiedAddr (&DnsConfigData->StationIp) && !NetIp6IsValidUnicast (&DnsConfigData->StationIp)) {
Status = EFI_INVALID_PARAMETER;
goto ON_EXIT;
}

Status = Dns6CopyConfigure (&Instance->Dns6CfgData, DnsConfigData);
--
1.9.5.msysgit.1
Loading...