Skip to content

Commit

Permalink
fix: remove possible false positive
Browse files Browse the repository at this point in the history
  • Loading branch information
Zxilly committed Dec 3, 2023
1 parent d880329 commit 6be399f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,13 @@ void handle_packet(const struct nf_queue* queue,const struct nf_packet* pkt) {
goto end;
}

if (!is_http_protocol(tcp_payload, tcp_payload_len)) {
send_verdict(queue, pkt, get_next_mark(pkt, false), NULL);
goto end;
}
// FIXME: can lead to false positive,
// should also get CTA_COUNTERS_ORIG to check if this packet is a initial tcp packet

// if (!is_http_protocol(tcp_payload, tcp_payload_len)) {
// send_verdict(queue, pkt, get_next_mark(pkt, false), NULL);
// goto end;
// }
count_http_packet();

const void* search_start = tcp_payload;
Expand Down

0 comments on commit 6be399f

Please sign in to comment.