All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: David Ahern <dsahern@gmail.com>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	emersonbernier@tutanota.com, Netdev <netdev@vger.kernel.org>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	David Miller <davem@davemloft.net>,
	piraty1@inbox.ru
Subject: Re: 5.1 `ip route get addr/cidr` regression
Date: Fri, 17 May 2019 10:35:43 -0700	[thread overview]
Message-ID: <20190517103543.149e9c6c@hermes.lan> (raw)
In-Reply-To: <2e6749cb-3a7a-242a-bd60-5fa7a8e724db@gmail.com>

On Fri, 17 May 2019 09:17:51 -0600
David Ahern <dsahern@gmail.com> wrote:

> On 5/17/19 4:22 AM, Jason A. Donenfeld wrote:
> > Hi,
> > 
> > I'm back now and catching up with a lot of things. A few people have
> > mentioned to me that wg-quick(8), a bash script that makes a bunch of
> > iproute2 invocations, appears to be broken on 5.1. I've distilled the
> > behavior change down to the following.
> > 
> > Behavior on 5.0:
> > 
> > + ip link add wg0 type dummy
> > + ip address add 192.168.50.2/24 dev wg0
> > + ip link set mtu 1420 up dev wg0
> > + ip route get 192.168.50.0/24
> > broadcast 192.168.50.0 dev wg0 src 192.168.50.2 uid 0
> >    cache <local,brd>
> > 
> > Behavior on 5.1:
> > 
> > + ip link add wg0 type dummy
> > + ip address add 192.168.50.2/24 dev wg0
> > + ip link set mtu 1420 up dev wg0
> > + ip route get 192.168.50.0/24
> > RTNETLINK answers: Invalid argument  
> 
> This is a 5.1 change.
> a00302b607770 ("net: ipv4: route: perform strict checks also for doit
> handlers")
> 
> Basically, the /24 is unexpected. I'll send a patch.
> 
> > 
> > Upon investigating, I'm not sure that `ip route get` was ever suitable
> > for getting details on a particular route. So I'll adjust the  
> 
> 'ip route get <prefix> fibmatch' will show the fib entry.
> 

If you want to keep the error, the kernel should send additional
extack as to reason. EINVAL is not user friendly...

  reply	other threads:[~2019-05-17 17:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-23 13:00 [BUG][iproute2][5.0] ip route show table default: "Error: ipv4: FIB table does not exist." emersonbernier
2019-03-24 14:17 ` David Ahern
2019-03-24 17:02   ` emersonbernier
2019-03-24 17:20     ` David Ahern
2019-03-24 17:34       ` emersonbernier
2019-03-24 17:36         ` David Ahern
2019-03-24 18:29       ` Michal Kubecek
2019-03-24 18:36         ` Michal Kubecek
2019-03-24 22:09           ` David Ahern
2019-05-02 13:17             ` emersonbernier
2019-05-09  2:24               ` David Ahern
2019-05-17 10:22 ` 5.1 `ip route get addr/cidr` regression Jason A. Donenfeld
2019-05-17 14:17   ` Michal Kubecek
2019-05-17 15:20     ` David Ahern
2019-05-17 15:22       ` Jason A. Donenfeld
2019-05-17 15:17   ` David Ahern
2019-05-17 17:35     ` Stephen Hemminger [this message]
2019-05-17 17:39       ` David Ahern
2019-05-17 20:19         ` Jason A. Donenfeld
2019-05-17 20:30           ` Jason A. Donenfeld
2019-05-17 17:40       ` 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=20190517103543.149e9c6c@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=Jason@zx2c4.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=emersonbernier@tutanota.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=piraty1@inbox.ru \
    /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.