-
Notifications
You must be signed in to change notification settings - Fork 133
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
Use systemd-resolved dbus interface instead of creating *.network files on-the-fly #13
Comments
However, if systemd-networkd is restarted for any reason, it'll lose all the info. The solution with temporary .network files doesn't have this problem. |
I don't know systemd very well but I don't see how restarting one service (networkd) would make another service (resolved) loose any info. |
The best option would be to push the DNS data directly into resolved, as mentioned. Restarting networkd has no effect on resolved keeping the DNS data you pushed into it around or not. However, currently resolved will forget data you push into it if you restart resolved itself. That's certainly something we should fix though... I added that to my todo list now. It would be fantastic if openvpn would push its discovered DNS data directly into resolved via the API we provide, and we have prepped documentation explaining how to do this: https://wiki.freedesktop.org/www/Software/systemd/writing-network-configuration-managers/ Note that the interfaces have been added very recently only, hence you need 229 or newer to make this work. |
Also, it seems that implemented solution is broken on newer systemd. Restarting systemd-networkd removes the IP from the VPN interface for some reason, leaving it without one. |
https://github.com/jonathanio/update-systemd-resolved |
Thanks for your engagement in this and the link! |
The script might remain useful for distributions stuck with older systemd versions, like Debian Jessie or Gentoo stable, though. So I'm against the complete removal. But users running newer systemd should be redirected to the better script, I think. |
Currently,
update-systemd-network.sh
script creates.network
files and restartssystemd-networkd
. I asked on #systemd if this is the right way of doing this and got response from @grawity:When using dbus there's no need to restart any service and create any files.
Docs for dbus API of resolved are at https://www.freedesktop.org/wiki/Software/systemd/resolved/
Compare RFE: please consider pushing DNS information into systemd-resolved
cc @WGH-
The text was updated successfully, but these errors were encountered: