From: David Ahern <dsahern@gmail.com>
To: Matt Ellison <matt@arroyo.io>
Cc: netdev@vger.kernel.org, stephen@networkplumber.org
Subject: Re: [PATCH v2 iproute2] ip: support for xfrm interfaces
Date: Mon, 21 Jan 2019 10:40:42 -0700 [thread overview]
Message-ID: <dc6b7446-ae7b-748d-25dc-565bf9eea14b@gmail.com> (raw)
In-Reply-To: <20190121120514.080451d1@aquamarine>
On 1/21/19 10:05 AM, Matt Ellison wrote:
> On Mon, 21 Jan 2019 09:14:52 -0700 David Ahern <dsahern@gmail.com> wrote:
>
>> You always add IF_ID even if not set by user. The kernel code does not
>> appear to require it so why pass a default value?
>
> 0 (the default) is a valid IF_ID, so setting an interface with a non-zero IF_ID
> back to 0 is possible. I think the better solution would be to check for existing
> values so an "ip link set" doesn't try and automatically use 0 if unsepcified.
I would expect IF_ID to only be added to the request if passed on the
command line. That should handle the set link case.
>
>> The kernel code does appear to require this parameter, so why have
>> this requirement in iproute2?
>
> Looks to be required, without the check I get:
> RTNETLINK answers: No such device
>
>> What about IFLA_XFRM_LINK?
>
> It shows up as the parent interface when you ip link show:
>
> 13: xfrm2@wlan0: <NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
> link/none 48:e2:44:f6:77:51 brd ff:ff:ff:ff:ff:ff
>
> But I can print it again if you think I should.
>
ok, so IFLA_XFRM_LINK duplicates IFLA_LINK. no need to print twice.
prev parent reply other threads:[~2019-01-21 17:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 14:40 [PATCH v2 iproute2] ip: support for xfrm interfaces Matt Ellison
2019-01-21 16:14 ` David Ahern
2019-01-21 17:05 ` Matt Ellison
2019-01-21 17:40 ` David Ahern [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=dc6b7446-ae7b-748d-25dc-565bf9eea14b@gmail.com \
--to=dsahern@gmail.com \
--cc=matt@arroyo.io \
--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 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).