Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.

Commit

Permalink
added code to attempt stateful detection of path mtu based on interna…
Browse files Browse the repository at this point in the history
…l tcp session initiation
  • Loading branch information
r-caamano committed Dec 23, 2023
1 parent e7b5794 commit bfe15f9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/zfw_tc_ingress.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,17 +744,16 @@ int bpf_sk_splice(struct __sk_buff *skb){
sk = bpf_skc_lookup_tcp(skb, o_session, sizeof(o_session->ipv4),BPF_F_CURRENT_NETNS, 0);
//bpf_printk("fragmentation needed srcip=%x, destip=%x, dport=%d", inner_iph->saddr, inner_iph->daddr, bpf_ntohs(o_session->ipv4.dport));
if(sk){
/*if (sk->state != BPF_TCP_LISTEN){
if (sk->state == BPF_TCP_LISTEN){
if(local_diag->verbose){

send_event(&event);
}
bpf_printk("fragmentation needed srcip=%x, destip=%x, dport=%d", inner_iph->saddr, inner_iph->daddr, bpf_ntohs(o_session->ipv4.dport));
bpf_sk_release(sk);
return TC_ACT_OK;
}*/
bpf_printk("fragmentation needed srcip=%x, destip=%x, dport=%d", inner_iph->saddr, inner_iph->daddr, bpf_ntohs(o_session->ipv4.dport));
}
bpf_sk_release(sk);
return TC_ACT_OK;
}else{
bpf_printk("not sK");
}
Expand Down

0 comments on commit bfe15f9

Please sign in to comment.