audk/NetworkPkg/UefiPxeBcDxe
Laszlo Ersek 3f55418d53 NetworkPkg/UefiPxeBcDxe: handle competing DHCP servers (more) gracefully
When DHCP is misconfigured on a network segment, such that two DHCP
servers attempt to reply to requests (and therefore race with each other),
the edk2 PXE client can confuse itself.

In PxeBcDhcp4BootInfo() / PxeBcDhcp6BootInfo(), the client may refer to a
DHCP reply packet as an "earlier" packet from the "same" DHCP server, when
in reality both packets are unrelated, and arrive from different DHCP
servers.

While the edk2 PXE client can do nothing to fix this, it should at least
not ASSERT() -- ASSERT() is for catching programming errors (violations of
invariants that are under the control of the programmer). ASSERT()s should
in particular not refer to external data (such as network packets). What's
more, in RELEASE builds, we get NULL pointer references.

Check the problem conditions with actual "if"s, and return
EFI_PROTOCOL_ERROR. This will trickle out to PxeBcLoadBootFile(), and be
reported as "PXE-E99: Unexpected network error".

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20200331004749.16128-1-lersek@redhat.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
2020-04-01 14:12:09 +00:00
..
ComponentName.c NetworkPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:15 -07:00
PxeBcBoot.c NetworkPkg/UefiPxeBcDxe: handle competing DHCP servers (more) gracefully 2020-04-01 14:12:09 +00:00
PxeBcBoot.h NetworkPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:15 -07:00
PxeBcDhcp4.c NetworkPkg/UefiPxeBcDxe: Fix various typos 2020-02-10 22:30:07 +00:00
PxeBcDhcp4.h NetworkPkg/UefiPxeBcDxe: Fix various typos 2020-02-10 22:30:07 +00:00
PxeBcDhcp6.c NetworkPkg/UefiPxeBcDxe: Fix various typos 2020-02-10 22:30:07 +00:00
PxeBcDhcp6.h NetworkPkg/UefiPxeBcDxe: Fix various typos 2020-02-10 22:30:07 +00:00
PxeBcDriver.c NetworkPkg/UefiPxeBcDxe: Fix various typos 2020-02-10 22:30:07 +00:00
PxeBcDriver.h NetworkPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:15 -07:00
PxeBcImpl.c NetworkPkg/UefiPxeBcDxe: Fix various typos 2020-02-10 22:30:07 +00:00
PxeBcImpl.h NetworkPkg/UefiPxeBcDxe:Add two PCD to control PXE. 2019-04-22 09:14:45 +08:00
PxeBcMtftp.c NetworkPkg/UefiPxeBcDxe: Fix various typos 2020-02-10 22:30:07 +00:00
PxeBcMtftp.h NetworkPkg/UefiPxeBcDxe: Fix various typos 2020-02-10 22:30:07 +00:00
PxeBcSupport.c NetworkPkg/UefiPxeBcDxe: Fix various typos 2020-02-10 22:30:07 +00:00
PxeBcSupport.h NetworkPkg/UefiPxeBcDxe: Fix various typos 2020-02-10 22:30:07 +00:00
UefiPxeBcDxe.inf NetworkPkg: Remove unnecessary MdeModulePkg/MdeModulePkg.dec dependency in INF 2019-10-08 09:20:34 +08:00
UefiPxeBcDxe.uni NetworkPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:15 -07:00
UefiPxeBcDxeExtra.uni NetworkPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:15 -07:00