mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
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:
parent
5f6142ce8c
commit
551b320502
1 changed files with 9 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue