Sending ICMP unreach control messages from BPF
The motivation Tetragon started implementing network policies in a similar style as Cilium network policy but with the extra capability of enforcing at the process level instead of the network namespace level. One of the fundamental difference is how Tetragon hooks the kernel to enforce the policy’s rules. Tetragon loads cgroup_skb BPF program types which can either return SKB_PASS or SKB_DROP to the kernel network stack. Thus, one UX issue arises: egress policy leading to dropping packets do not offer any kind of feedback to the local processes trying to send traffic. Netfilter offers a solution to this by implementing the REJECT verb in place of DROP, which offers two things, ICMP control message and TCP reset. ...