Skip to content

Commit

Permalink
ci: debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Zxilly committed Dec 18, 2024
1 parent 47198be commit 6ab008e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions scripts/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ def setup_iptables():


def cleanup_iptables():
os.system("iptables -L -v")
os.system("ip6tables -L -v")

os.system(f"iptables -D OUTPUT -p tcp --dport {PORT} -j NFQUEUE --queue-num 10010")
os.system(f"ip6tables -D OUTPUT -p tcp --dport {PORT} -j NFQUEUE --queue-num 10010")

Expand Down
3 changes: 1 addition & 2 deletions src/handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,7 @@ void handle_packet(const struct nf_queue *queue, const struct nf_packet *pkt) {
// This packet is not tcp, pass it
char buf[1000];
nfq_ip_snprintf(buf, sizeof(buf), nfq_ip_get_hdr(pkt_buff));
printf("Received non-tcp packet: %s\n", buf);

syslog(LOG_WARNING, "Received non-tcp packet: %s", buf);
send_verdict(queue, pkt, (struct mark_op){false, 0}, NULL);
syslog(LOG_WARNING, "Received non-tcp packet. You may set wrong firewall rules.");
goto end;
Expand Down

0 comments on commit 6ab008e

Please sign in to comment.