-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reply to spurious TCP packets with a RST.
Spurious TCP packets appear when the system is force-restarting due to an error. In such a case, open TCP connections are not properly teared down, and the remote TCP endpoint sends retransmissions to the newly restarted system. These spurious TCP packets are problematic because they fill packet buffers and quickly cause packet drops. This commit enables the firewall to reply to spurious TCP packets with TCP RST to stop the flow of spurious packets. We do this with a TCP RST "packet template" which we pre-set at startup and complete with MAC address, IP address, port, sequence number, and checksum, when sending the RST. To do this, we need to: - add needed 32-bit `ntohs` and `htons` - add a representation of a TCP header in the firewall compartment Signed-off-by: Hugo Lefeuvre <hugo.lefeuvre@scisemi.com> (cherry picked from commit ec54006)
- Loading branch information
Showing
1 changed file
with
230 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters