Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion NetworkPkg/Dhcp4Dxe/Dhcp4Impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,15 @@ EfiDhcp4Start (

if (CompletionEvent == NULL) {
while (DhcpSb->IoStatus == EFI_ALREADY_STARTED) {
DhcpSb->UdpIo->Protocol.Udp4->Poll (DhcpSb->UdpIo->Protocol.Udp4);
// MU_CHANGE [BEGIN] - Add Udp4 Polling break support
Status = DhcpSb->UdpIo->Protocol.Udp4->Poll (DhcpSb->UdpIo->Protocol.Udp4);
if (EFI_ERROR (Status)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the intention to catch things like EFI_DEIVCE_ERROR? Should this have an exception for EFI_TIMEOUT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the goal is to use the Poll() return code to prevent the system from hanging in the loop if polling encounters an error. I'll check if an exception for EFI_TIMEOUT should be added.

// Break out if the NIC goes away or poll fails so we don't spin forever.
DhcpSb->IoStatus = Status;
break;
}

// MU_CHANGE [END] - Add Udp4 Polling break support
}

return DhcpSb->IoStatus;
Expand Down