lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 4 Oct 2023 15:07:56 -0600
From: David Ahern <dsahern@...nel.org>
To: Donald Buczek <buczek@...gen.mpg.de>, netdev@...r.kernel.org
Subject: Re: question: ip link "dev" keyword deprecated?

On 9/23/23 6:09 AM, Donald Buczek wrote:
> Hi,
> 
> I've noticed, that veth(4) (from Linux man-pages) missed the "name"
> keyword in the second usage example:
> 
>     # ip link add <p1-name> netns <p1-ns> type veth peer <p2-name> netns
> <p2-ns>
> 
> which doesn't work with older iproute2 versions, e.g. 4.4, where
> <p2-name> is silently ignored.
> 
> I was about to send a man patch, but actually the syntax works with
> current iproute2 versions, because special coding has been removed and
> iplink_parse() interprets the non-keyword value "<p2-name>" from
> "<p2-name> netns <p2-ns>" as a "dev" option (with "dev" implied) and
> sets "name" to "dev" if only "dev" is given. So now for the same reason
> we can do
> 
>     ip link show lo
>     ip link show dev lo
> 
> we can also do any of
> 
>     # ip link add <p1-name> type veth peer name <p2-name>
>     # ip link add <p1-name> type veth peer dev <p2-name>
>     # ip link add <p1-name> type veth peer <p2-name>
> 
> But this looks like inherited baggage. And it doesn't work for older
> iproute2 versions. And veth(4) seems inconsistent with its two examples:
> 
>     # ip link add <p1-name> type veth peer name <p2-name>
>     # ip link add <p1-name> netns <p1-ns> type veth peer <p2-name> netns
> <p2-ns>
> 
> And even ip-link(8) from iproute2 itself doesn't talk about the "dev"
> keyword.
> 
> So I want to ask if there is a canonical syntax which should
> consistently be published and used, even if some legacy construct (like
> "peer <p2-name>") happen to work?
> 
> Related: Is the "dev" keywords generally deprecated?
> 
> 

"dev" still has relevance as `ip link help` shows.

Perhaps this commit is causing the change you noticed:

commit c58213f69c294c75ae6bd1ae16af7e0df29cf187
Author: Serhey Popovych <serhe.popovych@...il.com>
Date:   Wed Mar 7 10:40:39 2018 +0200

    iplink: Perform most of request buffer setups and checks in
iplink_parse()

    To benefit other users (e.g. link_veth.c) of iplink_parse() from
    additional attribute checks and setups made in iplink_modify(). This
    catches most of weired cobination of parameters to peer device
    configuration.

    Drop @name, @dev, @link, @group and @index from iplink_parse()
parameters
    list: they are not needed outside.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ