* [Patch 0/2] Clean the previous address since the policy changed
@ 2016-09-21 7:23 Jiaxin Wu
2016-09-21 7:23 ` [Patch 1/2] MdeModulePkg: " Jiaxin Wu
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Jiaxin Wu @ 2016-09-21 7:23 UTC (permalink / raw)
To: edk2-devel; +Cc: Hegde Nagaraj P, Subramanian Sriram, Ye Ting
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Jiaxin Wu (2):
MdeModulePkg: Clean the previous address since the policy changed
NetworkPkg: Clean the previous address since the policy changed
.../Universal/Network/Ip4Dxe/Ip4Config2Impl.c | 62 +++++++++++-----------
NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c | 59 ++++++++++----------
2 files changed, 60 insertions(+), 61 deletions(-)
--
1.9.5.msysgit.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Patch 1/2] MdeModulePkg: Clean the previous address since the policy changed
2016-09-21 7:23 [Patch 0/2] Clean the previous address since the policy changed Jiaxin Wu
@ 2016-09-21 7:23 ` Jiaxin Wu
2016-09-21 7:23 ` [Patch 2/2] NetworkPkg: " Jiaxin Wu
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jiaxin Wu @ 2016-09-21 7:23 UTC (permalink / raw)
To: edk2-devel; +Cc: Hegde Nagaraj P, Subramanian Sriram, Ye Ting
The previous DNS server data will be retained after the policy
changes from Dhcp to Static. This patch is used to clean the
previous dhcp configuration data.
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
---
.../Universal/Network/Ip4Dxe/Ip4Config2Impl.c | 62 +++++++++++-----------
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
index 75ad301..97b555b 100644
--- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
+++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
@@ -1144,43 +1144,43 @@ Ip4Config2SetPolicy (
if (NewPolicy == Instance->Policy) {
if (NewPolicy != Ip4Config2PolicyDhcp || Instance->DhcpSuccess) {
return EFI_ABORTED;
}
} else {
+ //
+ // The policy is changed. Clean the ManualAddress, Gateway and DnsServers,
+ // shrink the variable data size, and fire up all the related events.
+ //
+ DataItem = &Instance->DataItem[Ip4Config2DataTypeManualAddress];
+ if (DataItem->Data.Ptr != NULL) {
+ FreePool (DataItem->Data.Ptr);
+ }
+ DataItem->Data.Ptr = NULL;
+ DataItem->DataSize = 0;
+ DataItem->Status = EFI_NOT_FOUND;
+ NetMapIterate (&DataItem->EventMap, Ip4Config2SignalEvent, NULL);
+
+ DataItem = &Instance->DataItem[Ip4Config2DataTypeGateway];
+ if (DataItem->Data.Ptr != NULL) {
+ FreePool (DataItem->Data.Ptr);
+ }
+ DataItem->Data.Ptr = NULL;
+ DataItem->DataSize = 0;
+ DataItem->Status = EFI_NOT_FOUND;
+ NetMapIterate (&DataItem->EventMap, Ip4Config2SignalEvent, NULL);
+
+ DataItem = &Instance->DataItem[Ip4Config2DataTypeDnsServer];
+ if (DataItem->Data.Ptr != NULL) {
+ FreePool (DataItem->Data.Ptr);
+ }
+ DataItem->Data.Ptr = NULL;
+ DataItem->DataSize = 0;
+ DataItem->Status = EFI_NOT_FOUND;
+ NetMapIterate (&DataItem->EventMap, Ip4Config2SignalEvent, NULL);
+
if (NewPolicy == Ip4Config2PolicyDhcp) {
- //
- // The policy is changed from static to dhcp:
- // Clean the ManualAddress, Gateway and DnsServers, shrink the variable
- // data size, and fire up all the related events.
- //
- DataItem = &Instance->DataItem[Ip4Config2DataTypeManualAddress];
- if (DataItem->Data.Ptr != NULL) {
- FreePool (DataItem->Data.Ptr);
- }
- DataItem->Data.Ptr = NULL;
- DataItem->DataSize = 0;
- DataItem->Status = EFI_NOT_FOUND;
- NetMapIterate (&DataItem->EventMap, Ip4Config2SignalEvent, NULL);
-
- DataItem = &Instance->DataItem[Ip4Config2DataTypeGateway];
- if (DataItem->Data.Ptr != NULL) {
- FreePool (DataItem->Data.Ptr);
- }
- DataItem->Data.Ptr = NULL;
- DataItem->DataSize = 0;
- DataItem->Status = EFI_NOT_FOUND;
- NetMapIterate (&DataItem->EventMap, Ip4Config2SignalEvent, NULL);
-
- DataItem = &Instance->DataItem[Ip4Config2DataTypeDnsServer];
- if (DataItem->Data.Ptr != NULL) {
- FreePool (DataItem->Data.Ptr);
- }
- DataItem->Data.Ptr = NULL;
- DataItem->DataSize = 0;
- DataItem->Status = EFI_NOT_FOUND;
SET_DATA_ATTRIB (DataItem->Attribute, DATA_ATTRIB_VOLATILE);
- NetMapIterate (&DataItem->EventMap, Ip4Config2SignalEvent, NULL);
} else {
//
// The policy is changed from dhcp to static. Stop the DHCPv4 process
// and destroy the DHCPv4 child.
//
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Patch 2/2] NetworkPkg: Clean the previous address since the policy changed
2016-09-21 7:23 [Patch 0/2] Clean the previous address since the policy changed Jiaxin Wu
2016-09-21 7:23 ` [Patch 1/2] MdeModulePkg: " Jiaxin Wu
@ 2016-09-21 7:23 ` Jiaxin Wu
2016-09-21 9:59 ` [Patch 0/2] " Hegde, Nagaraj P
2016-09-21 10:29 ` Subramanian, Sriram (EG Servers Platform SW)
3 siblings, 0 replies; 5+ messages in thread
From: Jiaxin Wu @ 2016-09-21 7:23 UTC (permalink / raw)
To: edk2-devel; +Cc: Hegde Nagaraj P, Subramanian Sriram, Ye Ting
The previous DNS server data will be retained after the policy
changes from Auto to Manual. This patch is used to clean the
previous dhcp configuration data.
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
---
NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c | 59 +++++++++++++++++++--------------------
1 file changed, 29 insertions(+), 30 deletions(-)
diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
index 54522f9..75ecec1 100644
--- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
+++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
@@ -663,40 +663,39 @@ Ip6ConfigSetPolicy (
if (NewPolicy == Instance->Policy) {
return EFI_ABORTED;
} else {
-
- if (NewPolicy == Ip6ConfigPolicyAutomatic) {
- //
- // Clean the ManualAddress, Gateway and DnsServers, shrink the variable
- // data size, and fire up all the related events.
- //
- DataItem = &Instance->DataItem[Ip6ConfigDataTypeManualAddress];
- if (DataItem->Data.Ptr != NULL) {
- FreePool (DataItem->Data.Ptr);
- }
- DataItem->Data.Ptr = NULL;
- DataItem->DataSize = 0;
- DataItem->Status = EFI_NOT_FOUND;
- NetMapIterate (&DataItem->EventMap, Ip6ConfigSignalEvent, NULL);
-
- DataItem = &Instance->DataItem[Ip6ConfigDataTypeGateway];
- if (DataItem->Data.Ptr != NULL) {
- FreePool (DataItem->Data.Ptr);
- }
- DataItem->Data.Ptr = NULL;
- DataItem->DataSize = 0;
- DataItem->Status = EFI_NOT_FOUND;
- NetMapIterate (&DataItem->EventMap, Ip6ConfigSignalEvent, NULL);
-
- DataItem = &Instance->DataItem[Ip6ConfigDataTypeDnsServer];
- DataItem->Data.Ptr = NULL;
- DataItem->DataSize = 0;
- DataItem->Status = EFI_NOT_FOUND;
- NetMapIterate (&DataItem->EventMap, Ip6ConfigSignalEvent, NULL);
- } else {
+ //
+ // Clean the ManualAddress, Gateway and DnsServers, shrink the variable
+ // data size, and fire up all the related events.
+ //
+ DataItem = &Instance->DataItem[Ip6ConfigDataTypeManualAddress];
+ if (DataItem->Data.Ptr != NULL) {
+ FreePool (DataItem->Data.Ptr);
+ }
+ DataItem->Data.Ptr = NULL;
+ DataItem->DataSize = 0;
+ DataItem->Status = EFI_NOT_FOUND;
+ NetMapIterate (&DataItem->EventMap, Ip6ConfigSignalEvent, NULL);
+
+ DataItem = &Instance->DataItem[Ip6ConfigDataTypeGateway];
+ if (DataItem->Data.Ptr != NULL) {
+ FreePool (DataItem->Data.Ptr);
+ }
+ DataItem->Data.Ptr = NULL;
+ DataItem->DataSize = 0;
+ DataItem->Status = EFI_NOT_FOUND;
+ NetMapIterate (&DataItem->EventMap, Ip6ConfigSignalEvent, NULL);
+
+ DataItem = &Instance->DataItem[Ip6ConfigDataTypeDnsServer];
+ DataItem->Data.Ptr = NULL;
+ DataItem->DataSize = 0;
+ DataItem->Status = EFI_NOT_FOUND;
+ NetMapIterate (&DataItem->EventMap, Ip6ConfigSignalEvent, NULL);
+
+ if (NewPolicy == Ip6ConfigPolicyManual) {
//
// The policy is changed from automatic to manual. Stop the DHCPv6 process
// and destroy the DHCPv6 child.
//
if (Instance->Dhcp6Handle != NULL) {
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Patch 0/2] Clean the previous address since the policy changed
2016-09-21 7:23 [Patch 0/2] Clean the previous address since the policy changed Jiaxin Wu
2016-09-21 7:23 ` [Patch 1/2] MdeModulePkg: " Jiaxin Wu
2016-09-21 7:23 ` [Patch 2/2] NetworkPkg: " Jiaxin Wu
@ 2016-09-21 9:59 ` Hegde, Nagaraj P
2016-09-21 10:29 ` Subramanian, Sriram (EG Servers Platform SW)
3 siblings, 0 replies; 5+ messages in thread
From: Hegde, Nagaraj P @ 2016-09-21 9:59 UTC (permalink / raw)
To: Jiaxin Wu, edk2-devel@lists.01.org
Cc: Subramanian, Sriram (EG Servers Platform SW), Ye Ting
For the series:
Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Tested-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
-----Original Message-----
From: Jiaxin Wu [mailto:jiaxin.wu@intel.com]
Sent: Wednesday, September 21, 2016 12:53 PM
To: edk2-devel@lists.01.org
Cc: Hegde, Nagaraj P <nagaraj-p.hegde@hpe.com>; Subramanian, Sriram (EG Servers Platform SW) <sriram-s@hpe.com>; Ye Ting <ting.ye@intel.com>
Subject: [Patch 0/2] Clean the previous address since the policy changed
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Jiaxin Wu (2):
MdeModulePkg: Clean the previous address since the policy changed
NetworkPkg: Clean the previous address since the policy changed
.../Universal/Network/Ip4Dxe/Ip4Config2Impl.c | 62 +++++++++++-----------
NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c | 59 ++++++++++----------
2 files changed, 60 insertions(+), 61 deletions(-)
--
1.9.5.msysgit.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch 0/2] Clean the previous address since the policy changed
2016-09-21 7:23 [Patch 0/2] Clean the previous address since the policy changed Jiaxin Wu
` (2 preceding siblings ...)
2016-09-21 9:59 ` [Patch 0/2] " Hegde, Nagaraj P
@ 2016-09-21 10:29 ` Subramanian, Sriram (EG Servers Platform SW)
3 siblings, 0 replies; 5+ messages in thread
From: Subramanian, Sriram (EG Servers Platform SW) @ 2016-09-21 10:29 UTC (permalink / raw)
To: Jiaxin Wu, edk2-devel@lists.01.org; +Cc: Hegde, Nagaraj P, Ye Ting
Series Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
-----Original Message-----
From: Jiaxin Wu [mailto:jiaxin.wu@intel.com]
Sent: Wednesday, September 21, 2016 12:53 PM
To: edk2-devel@lists.01.org
Cc: Hegde, Nagaraj P <nagaraj-p.hegde@hpe.com>; Subramanian, Sriram (EG Servers Platform SW) <sriram-s@hpe.com>; Ye Ting <ting.ye@intel.com>
Subject: [Patch 0/2] Clean the previous address since the policy changed
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Jiaxin Wu (2):
MdeModulePkg: Clean the previous address since the policy changed
NetworkPkg: Clean the previous address since the policy changed
.../Universal/Network/Ip4Dxe/Ip4Config2Impl.c | 62 +++++++++++-----------
NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c | 59 ++++++++++----------
2 files changed, 60 insertions(+), 61 deletions(-)
--
1.9.5.msysgit.1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-09-21 10:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-21 7:23 [Patch 0/2] Clean the previous address since the policy changed Jiaxin Wu
2016-09-21 7:23 ` [Patch 1/2] MdeModulePkg: " Jiaxin Wu
2016-09-21 7:23 ` [Patch 2/2] NetworkPkg: " Jiaxin Wu
2016-09-21 9:59 ` [Patch 0/2] " Hegde, Nagaraj P
2016-09-21 10:29 ` Subramanian, Sriram (EG Servers Platform SW)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox