Chion82 / netfilter-full-cone-nat

A kernel module to turn MASQUERADE into full cone SNAT
GNU General Public License v2.0
427 stars 121 forks source link

解决多个 conntrack events 冲突的问题 #16

Closed LGA1150 closed 5 years ago

LGA1150 commented 6 years ago

高通 SFE fastpath 给内核打了补丁以支持多个注册回调(见 https://github.com/lede-project/source/pull/1269/files 952-net-conntrack-events-support-multiple-registrant.patch) 这也是 https://github.com/Chion82/netfilter-full-cone-nat/commit/d36ea63af6100e85ea144c6810391d242dbd4ca2 修复的问题,这个补丁修改了 conntrack events API 只是又得重新编译内核,看来还是不能避免给 netfilter 打 patch

Chion82 commented 6 years ago

个人意见,这种方式还是更适合 LEDE 或 openwrt,如果是一般发行版,还是尽量避免直接 patch 内核。

本模块注册 contrack_event 只是作为映射表主动老化的一个辅助机制,即使没有主动老化也有被动老化检测,对模块功能不会有很大影响的,如果有必要可以做一次高并发连接下的 benchmark 对比。