
3/29/2022 · Jordan Griege
What this post added
This post details the optimization of Magic Firewall's IP lists by migrating from nftables sets to eBPF maps (BPF_MAP_TYPE_LPM_TRIE). This change significantly reduced memory consumption by allowing IP lists to be shared across network namespaces instead of being duplicated. The post also describes the necessary patch to the nftables project to enable direct integration of eBPF programs, allowing for atomic rule replacements and enhanced packet inspection capabilities.