The DHCP4 can have only one configured child instance so we need to reset
the DHCP4 child when leaving PXE driver's LoadFile() function, otherwise the
other programs which also need to use DHCP4 (like HTTP boot) will be impacted.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18616
6f19259b-4bc3-4df7-8a09-
765794883524
// 3. unsupported.\r
//\r
PxeBc->Stop (PxeBc);\r
// 3. unsupported.\r
//\r
PxeBc->Stop (PxeBc);\r
+ } else {\r
+ //\r
+ // The DHCP4 can have only one configured child instance so we need to stop\r
+ // reset the DHCP4 child before we return. Otherwise these programs which \r
+ // also need to use DHCP4 will be impacted.\r
+ //\r
+ if (!PxeBc->Mode->UsingIpv6) {\r
+ Private->Dhcp4->Stop (Private->Dhcp4);\r
+ Private->Dhcp4->Configure (Private->Dhcp4, NULL);\r
+ }\r