All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Daniel Lakeland <dlakelan@street-artists.org>,
	Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org
Subject: Re: BUG REPORT: iproute2 seems to have bug with dsfield/tos in ip-rule and ip-route
Date: Wed, 13 Dec 2017 15:40:13 -0700	[thread overview]
Message-ID: <224860aa-17a8-37a1-cbfe-66899c1bba94@gmail.com> (raw)
In-Reply-To: <4f4e5fc5-2141-9e38-2f5f-da5f7558d505@street-artists.org>

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	other threads:[~2017-12-13 22:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13 17:40 BUG REPORT: iproute2 seems to have bug with dsfield/tos in ip-rule and ip-route Daniel Lakeland
2017-12-13 18:12 ` Stephen Hemminger
2017-12-13 18:33   ` Daniel Lakeland
2017-12-13 19:05   ` Daniel Lakeland
2017-12-13 22:40     ` David Ahern [this message]
2017-12-13 22:52       ` Daniel Lakeland
2017-12-13 23:05         ` David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=224860aa-17a8-37a1-cbfe-66899c1bba94@gmail.com \
    --to=dsahern@gmail.com \
    --cc=dlakelan@street-artists.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.