Skip to content

Commit

Permalink
Update ttltrack.c
Browse files Browse the repository at this point in the history
  • Loading branch information
SashaXser committed Apr 27, 2024
1 parent e57ac3a commit e8b369f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ttltrack.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ int tcp_handle_incoming(uint32_t srcip[4], uint32_t dstip[4],
debug("trying to add TCP srcport = %hu, dstport = %hu\n", ntohs(srcport), ntohs(dstport));

// Check if it's a SYN/ACK or ACK segment
if (flags & (TH_SYN | TH_ACK)) {
// SYN/ACK segment
if ((flags & 0x18) == 0x18) {
// SYN/ACK segment (SYN=1, ACK=1)
return add_tcp_conntrack(srcip, dstip, srcport, dstport, is_ipv6, ttl);
} else if (flags & TH_ACK) {
// ACK segment
} else if (flags & 0x10) {
// ACK segment (ACK=1)
tcp_connrecord_t *tmp_connrecord = NULL;
char key[TCP_CONNRECORD_KEY_LEN];
construct_key(dstip, srcip, dstport, srcport, key, is_ipv6);
Expand Down

0 comments on commit e8b369f

Please sign in to comment.