Chinaunix

标题: iptables,patch-0-matic,内核三者间的关系? [打印本页]

作者: liyanux    时间: 2006-01-05 16:32
标题: iptables,patch-0-matic,内核三者间的关系?
最近一直尝试给netfiter和iptables打patch-0-matic的补丁,遇到一些问题,最后解决,过程是这样的:我的内核是2.4.30,iptables 1.2.11,一开始用的是比较新的patch-0-matic版本20051221,我的编译过程一直按照platinum大哥的hoto来进行,但是编译成功后发现对inat表的激活总是没有相应,从netfilter的官方网站上看到:You have just upgraded your kernel and suddenly some of the commands (especially in the 'nat' table), and you experience something like:                                         
# iptables -A POSTROUTING -t nat -o ppp0 -j MASQUERADE
iptables: Invalid argument
This happens when the structure size between kernel and userspace changes. You will need to recompile the iptables userspace program using the include files of your new kernel. This only happens if you (or the vendor of your kernel) has applied some patches either only to the old or only to the new kernel.
于是我怀疑是patch-0-matic包版本问题,于是从网上找到了比较老的patch-0-matic(2004621)结果编译成功后一起正常。

因此我想请教各位,在编译netfilter的时候,iptables版本和patch-0-matic之间的选择应该遵循什么原则,是否还要考虑到内核版本的问题,例如通过查找资料我发现:
1 在2004621的patch-0-matic中没有ipp2p模块
2 string模块只能支持到kernel 2.6.9
3 sip-conntrack-nat模块只能从2.6.11开始

[ 本帖最后由 liyanux 于 2006-1-5 16:33 编辑 ]




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2