- 论坛徽章:
- 0
|
本帖最后由 solitrarychen 于 2013-09-11 16:05 编辑
回复 162# Godbach
刚开始看iptables,有几个地方我一直没有搞明白,希望你能解答一下。在iptables.c中定义的一个全局变量iptables_command_state cs。cs其中的一个值,cs->invert, 这个值得作用是什么?
为什么要反复判断cs->invert的值,这个值初始化为0,在什么情况下会变为1哪?
还有就是,在docommand()中使用getopt_long()循环判断各种条件的时候,当case 'm': command(&cs);时,在command(&cs)中调用了函数xtables_find_match(),之后xtables_find_match()调用了xtables_fullt_register_pending_match()函数,结果这两个函数相互调用,搞得头好晕啊,一点头绪都没有。
我觉得每一次执行iptables命令时,全局变量 xtables_match* xtable_match这个指针都应该是空的啊?
我看的版本是:
kernel version 3.6.x
iptables version 1.4.16.3
|
|