Skip to content

Commit 088cd33

Browse files
tcp: Don't waste time creating connection for non SYN
1 parent e10f1aa commit 088cd33

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/net/tcp/listener.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ void Listener::segment_arrived(Packet_ptr packet) {
6262
// if it's a new attempt (SYN)
6363
else
6464
{
65+
// don't waste time if the packet does not have SYN
66+
if(UNLIKELY(not packet->isset(SYN)))
67+
return;
68+
6569
// Stat increment number of connection attempts
6670
host_.connection_attempts_++;
6771

0 commit comments

Comments
 (0)