NetworkPkg/TcpDxe: Skip RST when no IpIo sender exists for Dst

Unknown or closed segments still go down the RST path into
TcpSendIpPacket. When no IpIo sender exists for the destination,
each packet logs “No appropriate IpSender.” next to the usual
discard traces and floods the console. The change calls
IpIoFindSender before SEND_RESET and discards when it fails,
which stops that storm and leaves normal RST behavior unchanged
when a sender is present.

Cc: Saloni Kasbekar <saloni.kasbekar@intel.com>
Cc: Zachary Clark-williams <zachary.clark-williams@intel.com>
Cc: Mike Beaton <mjsbeaton@gmail.com>
Signed-off-by: Matthew Graham <Matthew.Graham@amd.com>
This commit is contained in:
Matthew Graham 2026-04-13 10:56:49 -05:00 committed by mergify[bot]
parent 5f6142ce8c
commit 551b320502

View file

@ -725,6 +725,7 @@ TcpInput (
UINT16 Checksum;
INT32 Usable;
EFI_STATUS Status;
IP_IO *IpIoProbe;
ASSERT ((Version == IP_VERSION_4) || (Version == IP_VERSION_6));
@ -780,9 +781,15 @@ TcpInput (
);
if ((Tcb == NULL) || (Tcb->State == TCP_CLOSED)) {
DEBUG ((DEBUG_NET, "TcpInput: send reset because no TCB found\n"));
//
// No IpIo sender for Dst: cannot emit RST; discard to avoid failed sends.
//
IpIoProbe = NULL;
Tcb = NULL;
if (IpIoFindSender (&IpIoProbe, Version, Dst) == NULL) {
goto DISCARD;
}
Tcb = NULL;
goto SEND_RESET;
}