Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatic support for host-to-host networking that only does link-local addressing #29767

Merged
merged 3 commits into from Oct 31, 2023

Conversation

poettering
Copy link
Member

This adds some basic support for automatic host-to-host networking (i.e. direct connections between two systems with network connectivity that does not involve the Internet).

This is a generalization of https://github.com/NetworkManager/NetworkManager/blob/main/data/90-nm-thunderbolt.rules#L11 but also covers Prolific host-to-host USB devices.

@github-actions github-actions bot added the please-review PR is ready for (re-)review by a maintainer label Oct 30, 2023
@poettering
Copy link
Member Author

(I also notified NM folks about this: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1413)

@poettering
Copy link
Member Author

/cc @thom311

rules.d/82-net-auto-link-local.rules Outdated Show resolved Hide resolved
network/80-auto-link-local.network.example Outdated Show resolved Hide resolved
network/80-auto-link-local.network.example Outdated Show resolved Hide resolved
@yuwata
Copy link
Member

yuwata commented Oct 30, 2023

Please also disable IPv6AcceptRA=, which is enabled by default.

TODO Show resolved Hide resolved
…local addressing

This is a generalization of this logic:

https://github.com/NetworkManager/NetworkManager/blob/main/data/90-nm-thunderbolt.rules

It applies not just to thunderbolt, but to any kind of device, even
matched by vendor/product, via hwdb.

I added two entries for Prolific PC-to-PC devices (of which I have one
lying around).
…LY=1

This is name ".network.example" for now, to match the existing
80-ethernet.network file.

I think it would make sense to actually install this by default if told
so via a meson file (and then hopefully this would happen even on
Fedora, though in a split off RPM or so). However, we aren't there yet,
hence for now, just ship the .network files as example, like the others.
@poettering poettering changed the title autmatic support for host-to-host networking that only does link-local addressing automatic support for host-to-host networking that only does link-local addressing Oct 30, 2023
@yuwata yuwata merged commit fd21f0c into systemd:main Oct 31, 2023
33 of 35 checks passed
@github-actions github-actions bot removed the please-review PR is ready for (re-)review by a maintainer label Oct 31, 2023
thom311 pushed a commit to NetworkManager/NetworkManager that referenced this pull request Oct 31, 2023
This property has the same meaning than ours
NM_AUTO_DEFAULT_LINK_LOCAL_ONLY. It is a good idea to check for it
because systemd will flag with it a higher number of devices, and we
might consider it as the new "standard" at least for systemd based
distros.
See systemd/systemd#29767.

Maintain NM_AUTO_DEFAULT_LINK_LOCAL_ONLY for compatibility reasons, and
give it precedence over the systemd one. It is specific to NM and users
could add it to overwrite a systemd's default without having to modify
systemd files.
thom311 added a commit to NetworkManager/NetworkManager that referenced this pull request Nov 2, 2023
We honored "NM_AUTO_DEFAULT_LINK_LOCAL_ONLY" udev property, for when we
generate a "Wired connection 1" (aka the "auto-default connection").

Systemd now also honors and may set ID_NET_AUTO_LINK_LOCAL_ONLY for
a similar purpose. Honore that too.

The NM specific variable still is preferred, also because "NM_AUTO_DEFAULT_LINK_LOCAL_ONLY"
is about something very NetworkManager specific (controlling "Wired connection 1").

Maybe one day, we should drop "data/90-nm-thunderbolt.rules" and only
rely on what systemd provides. But not yet.

See-also: systemd/systemd#29767
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1413
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants