From mboxrd@z Thu Jan 1 00:00:00 1970 From: "zhangxiliang" Subject: The "value" of "-m dscp -dscp" for iptables command Date: Thu, 23 Aug 2007 13:17:09 +0800 Message-ID: <029301c7e544$daf47860$3f8da70a@zhangxiliang> To: Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org Hello, I find a bug in the manpage of iptables: The description for the value in option "-m dscp -dscp" should be modified to 0~63. The option can match 6 bit DSCP field within the TOS field in the IP header. So the range for the option should be 0~(2^6-1)£¬that is 0~63. 1) use "iptables -m dscp --dscp 63" : 1. iptables -A INPUT -m dscp --dscp 63 2. iptables -L INPUT | grep "DSCP match 0x3f" I have made a patch for the manpage of the iptables-1.3.5-1.2.1. The content of the patch: diff -ru iptables-1.3.5.org/extensions/libipt_dscp.man iptables-1.3.5/extensions/libipt_dscp.man --- iptables-1.3.5.org/extensions/libipt_dscp.man 2007-08-01 20:29:03.000000000 +0800 +++ iptables-1.3.5/extensions/libipt_dscp.man 2007-08-01 20:30:09.000000000 +0800 @@ -2,7 +2,7 @@ IP header. DSCP has superseded TOS within the IETF. .TP .BI "--dscp " "value" -Match against a numeric (decimal or hex) value [0-32]. +Match against a numeric (decimal or hex) value [0-63]. .TP .BI "--dscp-class " "\fIDiffServ Class\fP" Match the DiffServ class. This value may be any of the Regards Zhang Xiliang begin 666 iptables_dscp.patch M9&EF9B M"D@ M=F%L=64@6S M,S)=+@HK36%T8V@@86=A:6YS="!A(&YU;65R:6,@*&1E8VEM M86P@;W(@:&5X*2!V86QU92!;,"TV,UTN"B N5% *("Y"22 B+2UD2!B92!A;GD@;V8@=&AE"@`` ` end