On 12/13/17 12:05 PM, Daniel Lakeland wrote:
> Following up my previous email with output from the machine:
> Note that like some of those other people I was able to get ip rule to
> accept tos values with just low order bits set
> 
> Here is example of how ip rule accepts low order dsfield bits but not
> modern DSCP type bits, also including some version info
> 
> dlakelan@pingpong:~$ sudo ip rule add dsfield 0x0c table 100
> dlakelan@pingpong:~$ ip rule show
> 0:    from all lookup local
> 32765:    from all tos 0x0c lookup 100
> 32766:    from all lookup main
> 32767:    from all lookup default
> 
> 
> dlakelan@pingpong:~$ sudo ip rule add dsfield 0xc0 table 100
> RTNETLINK answers: Invalid argument

In fib4_rule_configure, this the check that is failing:

    if (frh->tos & ~IPTOS_TOS_MASK)
        goto errout;

and EINVAL is returned.

IPv4 routes has not checking on tos -- it is passed from user and
rtm_tos to fc_tos to fib alias tos.

Reply via email to