亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区
Chinaunix
標(biāo)題:
iptables Segmentation fault,呵呵
[打印本頁]
作者:
liuzhuan23
時間:
2006-10-23 01:37
標(biāo)題:
iptables Segmentation fault,呵呵
1)隨意看了看iptables的extensions的代碼,看到 libipt_ttl.c 的時候,發(fā)現(xiàn)這份代碼的一個問題
我的配置: iptables-1.3.4,已經(jīng)pom和patch了
2)在 1.3.4 版本的 parse 函數(shù)中,竟然把下述代碼放到了 option 解析之后:
if( * flags )
{
exit_error(PARAMETER_PROBLEM, "Can't specify TTL option twice");
}
即原來的代碼是這樣的:
switch( c )
{
....................
}
if( * flags )
{
exit_error(PARAMETER_PROBLEM, "Can't specify TTL option twice");
}
看到之后,感覺這段代碼一定會導(dǎo)致 Segmentation fault,于是試了一試:
iptables -A INPUT -m ttl --ttl-eq 123 -J DROP
果然,Segmentation fault,注意,這里我使用的是 -J 而不是 -j
3)如何解決:
if( * flags )
{
exit_error(PARAMETER_PROBLEM, "Can't specify TTL option twice");
}
代碼放到 check_inverse(optarg, &invert, &optind, 0); 之前即可,把該檢查的邏輯放到頭里去做
4)也許有別人也遇到這個問題,希望對你們有幫助
歡迎光臨 Chinaunix (http://www.72891.cn/)
Powered by Discuz! X3.2