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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 9 Jan 2017 00:30:19 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel@...oirfairelinux.com,
        "David S. Miller" <davem@...emloft.net>,
        Florian Fainelli <f.fainelli@...il.com>,
        Uwe Kleine-König <uwe@...ine-koenig.org>,
        Andrey Smirnov <andrew.smirnov@...il.com>,
        Jiri Pirko <jiri@...nulli.us>
Subject: Re: [PATCH net-next v2] net: dsa: make "label" property optional for
 dsa2

> Until the printing of netdev_phys_item_id structures is fixed in
> net/core/net-sysfs.c, an external helper can be used like this:

Hi Vivien

As Florian pointed out, this cannot be changed. It is now part of the
ABI. We have to live with it printing little endian numbers as big
endian.

>     # cat /etc/udev/rules.d/90-net-dsa.rules
>     SUBSYSTEM=="net", ACTION=="add", ENV{DEVTYPE}=="dsa", PROGRAM="/lib/udev/dsanitizer $attr{phys_switch_id} $attr{phys_port_id}", NAME="$result"
> 
>     # cat /lib/udev/dsanitizer
>     #!/bin/sh
>     echo $1 | sed -e 's,^0*,,' -e 's,0*$,,' | xargs printf sw%d
>     echo $2 | sed -e 's,^0*,,' | xargs printf p%d
> 
>     # ip link | awk '/@.../ { split($2,a,"@"); print a[1]; }'
>     sw0p0
>     sw0p1
>     sw0p2
>     sw1p0
>     sw1p1
>     sw1p2
>     sw2p0
>     sw2p1
>     sw2p2
>     sw2p3
>     sw2p4

Rather than recommending something, it might be better to point to the
Free Desktop "Predictable Network Interface Names" which is what most
people will end up with, if they rename:

https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

It would also be good to test on a recent systemd system and see what
happens. What names does it pick?

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ