[if gte mso 9]>
Subject: [edk2] UEFI Shell Ping fails on first use after boot (when adapter is configured for DHCP)
From: "Jeff Bobzin" <firstname.lastname@example.org>
Date: 2014-09-26 04:05:40
In UEFI shell source, in Ping.c, there is this line,
Status = ((EFI_IP4_PROTOCOL*)(Private->IpProtocol))->Configure (Private->IpProtocol, &Ip4Config);
When this function returns, EFI_NO_MAPPING, the spec says “DHCP is not finished yet.”
I would suggest the best design would be for ping to wait a bit and retry.
The spec suggest a call to GetModeData() to check the status and “make sure the default IP4 address is ready.”
Instead it prints “Config No Mapping” and exits. Not a very helpful message to the user.
The result is for a system with a net adapter configured for DHCP, the first ping after boot always fails with this odd message.
A second attempt to ping will succeed.
The same issue probably will not exist for IPv6 because the IP6 local address generation is always static.
I do not see this issue with the old EFI shell binary.