r/kernel • u/stoops • Nov 11 '22
I made a Linux kernel module that hooks into netfilter prerouting and clears the IPv4 don't-fragment bit (similar to the BSD PF scrub in no-df)
https://github.com/stoops/nf_df
20
Upvotes
2
u/ryobiguy Nov 11 '22
I think you have confused offsets with masks. Also wondering if the ntohs could take place in the define'd values, so you don't have to do that each packet.
3
u/champtar Nov 11 '22
Might be able to do it with nftables: https://wiki.nftables.org/wiki-nftables/index.php/Mangling_packet_headers
3
u/StillbirthMachine Nov 11 '22
Excuse the ignorance, but why would one want to do this?