Validating offsets in an skb is no easy task. Add helpers to make checks more consistent in our probes and do the best we can do to guess if offsets are valid or not.
Note that this cannot be 100% failsafe. When converting Retis to parse packets in the Rust side we'll be able to improve further offset detection by using the BPF side as a hint only.
Turns out the pcap support (merged in #265) was causing a verifier issue on Ubuntu 22.04. This PR now also fixes it (which was not straightforward but I think the fix is acceptable).
Validating offsets in an skb is no easy task. Add helpers to make checks more consistent in our probes and do the best we can do to guess if offsets are valid or not.
Note that this cannot be 100% failsafe. When converting Retis to parse packets in the Rust side we'll be able to improve further offset detection by using the BPF side as a hint only.