Created attachment 1899583 [details] patch to get DNS and Saveconfig combination running in wg-quick Description of problem: DNS= lines disappear from the configuration if SaveConfig=true Version-Release number of selected component (if applicable): wireguard-tools-1.0.20210914-2.fc36.x86_64 How reproducible: Always Steps to Reproduce: 1.wg-quick up wg0 with DNS= and SaveConfig=true in wg0.conf 2.wg-quick down wg0 3. Actual results: DNS= lost in config file Expected results: DNS= as before Additional info: The save_config routine in wg-quick uses "resolvconf -l " to get a list of nameservers for this interface. This is not supported in Fedora 36. The second try is listing a file which also does not exist in Fedora. Adding a third try calling "resolvectl dns <interfacevar> " and adapting the output to be equal to "resolvconf -l" with cut and awk fixes the problem. Probably there are cleaner ways to adapt the script to the different distributions.
Hi there, Have thought about pushing these changes upstream to see if we can fix things at that level vs maintaining a patch on our end? Jason is pretty good about taking patches for these kinds of things. Joe
I applied and verified the functionality. It fixes the problem. This topic is discussed here, for background: https://ask.fedoraproject.org/t/wireguard-client-not-working-even-if-wg0-is-showing-traffic-count/ I'd check if the rpm dependencies cover the tools used in patch, resolvectl, cut, awk.
Thanks. Of course fine to send the patch to upstream. The good thing of the patch is that it is one line and works, the bad thing is that it modifies the output of a command to mimic another command. May be there are better ways to get the info, like a welldefined DBus API. And it is not guaranteed that systemd-resolved is up in Fedora, so probably it is not easy to program it in a robust way for all environments in all configurations.
This message is a reminder that Fedora Linux 36 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '36'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 36 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 36 entered end-of-life (EOL) status on 2023-05-16. Fedora Linux 36 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed.