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-next>] [day] [month] [year] [list]
Message-ID: <bc7bf168-2a37-cd8e-3cac-cfd7ae475ebc@molgen.mpg.de>
Date: Sat, 23 Sep 2023 14:09:04 +0200
From: Donald Buczek <buczek@...gen.mpg.de>
To: netdev@...r.kernel.org
Subject: question: ip link "dev" keyword deprecated?

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?


Thanks

   Donald

-- 
Donald Buczek
buczek@...gen.mpg.de
Tel: +49 30 8413 1433

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ