netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: David Ahern <dsa@cumulusnetworks.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] ip route: error out on multiple via without nexthop keyword
Date: Fri, 20 Jan 2017 09:38:09 -0800	[thread overview]
Message-ID: <20170120093809.5f771c4f@xeon-e3> (raw)
In-Reply-To: <1484845701-19354-1-git-send-email-dsa@cumulusnetworks.com>

On Thu, 19 Jan 2017 09:08:21 -0800
David Ahern <dsa@cumulusnetworks.com> wrote:

> To specify multiple nexthops in a route the user is expected to use the
> "nexthop" keyword which ip route uses to create the RTA_MULTIPATH.
> However, ip route always accepts multiple 'via' keywords where only the
> last one is used in the route leading to confusion. For example, ip
> accepts this syntax:
>     $ ip ro add vrf red  1.1.1.0/24 via 10.100.1.18 via 10.100.2.18
> 
> but the route entered inserted by the kernel is just the last gateway:
>     1.1.1.0/24 via 10.100.2.18 dev eth2
> 
> which is not the full request from the user. Detect the presense of
> multiple 'via' and give the user a hint to add nexthop:
> 
>     $ ip ro add vrf red  1.1.1.0/24 via 10.100.1.18 via 10.100.2.18
>     Error: argument "via" is wrong: use nexthop syntax to specify multiple via
> 
> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>

Applied thanks.

      reply	other threads:[~2017-01-20 17:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-19 17:08 [PATCH iproute2] ip route: error out on multiple via without nexthop keyword David Ahern
2017-01-20 17:38 ` Stephen Hemminger [this message]

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=20170120093809.5f771c4f@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dsa@cumulusnetworks.com \
    --cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).