Open sbernard31 opened 5 years ago
It seems this is possible to send ICMP packet from XDP, katran seems to do that.
some example about decrease TTL : https://github.com/torvalds/linux/blob/master/samples/bpf/xdp_fwd_kern.c
Partially done by #33 but we don't send ICMP packet for now.
The IP header contains a TTL field (see RFC 791):
The wikipedia explanation is maybe better :
We can consider sbulb as a router, so If we want to be a good internet citizen we should update TTL field and discard packet if needed. This part should be easy to implement.
About sending an ICMP packet, I don't know if this is easy maybe we can just let the Linux kernel do that ? (return XDP_PASS)