lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 29 Mar 2010 19:42:14 -0700
From:	Stephen Hemminger <shemminger@...tta.com>
To:	thomas yang <lampsu@...il.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [iproute2] a 'ip rule ...' bug?

On Fri, 26 Mar 2010 20:15:30 +0800
thomas yang <lampsu@...il.com> wrote:

> in  /etc/iproute2/rt_dsfield
> ...
> # Newer RFC2597 values
> 0x28	AF11
> 0x30	AF12
> 0x38	AF13
> ...


> ---in   ip  man page ---
> ip rule add - insert a new rule
> 
> tos TOS
> dsfield TOS
>     select the TOS value to match.
> ---

Read the syntax on the man page:
       ip rule  [ list | add | del | flush ] SELECTOR ACTION

       SELECTOR := [ from PREFIX ] [ to PREFIX ] [ tos TOS ] [ fwmark
               FWMARK[/MASK] ] [ dev STRING ] [ pref NUMBER ]


There is no mention of dsfield argument.

> 
> [root@...alhost ~]# ip rule add dsfield 0x28 table 200
> Error: argument "dsfield" is wrong: Failed to parse rule type
> 
> why???
> how to match 'dsfield' ?
> 
> [root@...alhost ~]# ip rule add tos 0x28 table 200
> RTNETLINK answers: Invalid argument
> 
> (My OS is Fedora 11 :  kernel-2.6.30.10-105.2.23.fc11.i586 ,
> iproute-2.6.29-2.fc11.i586 ;
> on my another linux box ( Fedora 7)   'ip rule'  also has the same
> problem  to match  tos and dsfield. )

TOS field is masked by down to only 2 bits. 
See include/net/route.h in kernel source.
I think the reason was that with original TOS (pre dsfield) route design,
the implementors wanted to save space.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ