summaryrefslogtreecommitdiffstats
path: root/network/99-default.link (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Reapply "network: add "mac" to alternatives name policy by default"Yu Watanabe2024-06-121-1/+1
| | | | | | | | | | | | | This reverts commit 152c8946b3a93bb2c086568832d614cb54f11e13. The kernel patch https://lore.kernel.org/linux-usb/20240605153340.25694-1-gmazyland@gmail.com/ is now in net-next branch, and will be hopefully merged soon. Note that Debian's 73-usb-net-by-mac.link now also supports the kernel patch: https://salsa.debian.org/systemd-team/systemd/-/commit/c1afbb2dc295929085be86072c7942c8517ec598 So, hopefully, the change is ready. Let's reapply it.
* Revert "network: add "mac" to alternatives name policy by default" (#33227)Zbigniew Jędrzejewski-Szmek2024-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0f5a529217f1327f020ab54deed09e6fae1f1fef. As discussed in https://github.com/systemd/systemd/issues/33104, that patch caused problems in Debian which has a udev drop-in with [Match] Path=*-usb-* [Link] NamePolicy=mac The rename fails: eth0: Policy *mac* yields "enx00*". eth0: /usr/lib/udev/rules.d/80-net-setup-link.rules:11 NAME 'enx00*' eth0: /usr/lib/udev/rules.d/99-systemd.rules:69 RUN '/usr/lib/systemd/systemd-sysctl --prefix=/net/ipv4/conf/$name --prefix=/net/ipv4/neigh/$ eth0: sd-device: Created database file '/run/udev/data/n9' for '/devices/pci0000:00/0000:00:1c.4/0000:02:00.0/0000:03:01.0/0000:05:00.0/0000: eth0: Failed to rename network interface 9 from 'eth0' to 'enx00*': File exists eth0: sd-device: Created database file '/run/udev/data/n9' for '/devices/pci0000:00/0000:00:1c.4/0000:02:00.0/0000:03:01.0/0000:05:00.0/0000: eth0: Failed to process device, ignoring: File exists Two network interfaces have the same MAC and it's not marked NET_ADDR_STOLEN. In this case the conflict is very visible because it causes the rename to fail, but it would also occur in other cases, for alternative names. A patch has been submitted for r8152 to properly set NET_ADDR_STOLEN: https://lore.kernel.org/linux-usb/20240605153340.25694-1-gmazyland@gmail.com/T/#u Let's revert this now to avoid a regression. We can try again after the kernel issue is resolved. Closes https://github.com/systemd/systemd/issues/33104.
* network: suggest using "networkctl edit" instead of copying manuallyMike Yuan2024-04-231-6/+1
|
* network: add "mac" to alternatives name policy by defaultLennart Poettering2024-04-221-1/+1
| | | | | Alternative names are basically free, hence add "mac" there too, to make it easier to see what names could be used as primary options too.
* network: change license of examples to MIT-0Zbigniew Jędrzejewski-Szmek2022-10-261-2/+2
| | | | | | | | | | | | | | | Arguably, CC0 is just fine for examples since they are not code. But it's easier to be consistent and just use MIT-0 for all "documentation". Thus, the license is changed similarly code examples under man/. Based on 'git shortlog -ns network/*' and 'git log -p', the following folks should ack this: Zbigniew Jędrzejewski-Szmek Lennart Poettering Tom Gundersen Yu Watanabe Daan De Meyer Marc-André Lureau
* network: license all config files as CC0Zbigniew Jędrzejewski-Szmek2022-01-121-6/+10
| | | | | | | | Same justification as the previous commit. $ for i in network/*-*; do git blame $i;done | less shows that those files were written by Tom Gundersen, Lennart Poettering, Yu Watanabe, me, and Marc-André Lureau.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* network: set AlternativeNamesPolicy= in 99-default.linkYu Watanabe2019-12-171-0/+1
|
* udev,network: warn when .link or .network file has no [Match] sectionYu Watanabe2019-04-251-0/+3
| | | | Closes #12098.
* link-config: add "keep" policy and use it by defaultZbigniew Jędrzejewski-Szmek2019-01-171-1/+1
| | | | | | | | | | | | | | If "keep" policy is specified, and the interface has a name that is NET_NAME_USER or NET_NAME_RENAMED, we stop processing rules. "keep" should probably be specified either first or last depending on the preference. This partially reimplements 55b6530baacf4658a183b15b010a8cf3483fde08, in the sense that if the "keep" policy is not specified, and if the interface has a NamingPolicy, it will be renamed, even if it had a name previously. So this breaks backwards compatibility in this case, but that's more in line with what users expect. Closes #9006.
* Add SPDX license headers to various assorted filesZbigniew Jędrzejewski-Szmek2017-11-191-0/+9
|
* udev: link_setup - respect kernel name assign policyTom Gundersen2014-08-081-1/+1
| | | | | | | | | Newer kernels export meta-information about the origin of an ifname. Respect this from the ifname rename logic. We do not rename any interfaces that was originally named by userspace, nor once which have already been renamed from userspace. Moreover, we optionally do not (the default) rename interfaces which the kernel claims to have named in a predictable way.
* udev: net-config - allow interface names to be set from the hwdbTom Gundersen2014-02-191-1/+1
|
* network: move configuration to /etc/systemd/networkTom Gundersen2013-10-291-0/+3
This is private configuraiton, so let's not pollute the namespace (and hence make Debian happy :) ).