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

DNS Seems Broken #24

Closed
Queuecumber opened this issue Nov 27, 2018 · 3 comments
Closed

DNS Seems Broken #24

Queuecumber opened this issue Nov 27, 2018 · 3 comments

Comments

@Queuecumber
Copy link
Contributor

cc @Druco

When I use wg-quick DNS settings work fine, but when I use network-manager it doesn't seem to work. Examining the log I think the problem is

Nov 27 11:48:10 lilith NetworkManager[25167]: [#] ip link add Wireguard type wireguard
Nov 27 11:48:10 lilith NetworkManager[25167]: [#] wg setconf Wireguard /dev/fd/63
Nov 27 11:48:10 lilith NetworkManager[25167]: <info>  [1543337290.4677] manager: (Wireguard): new Generic device (/org/freedesktop/NetworkManager/Devices/79)
Nov 27 11:48:10 lilith NetworkManager[25167]: <info>  [1543337290.4814] devices added (path: /sys/devices/virtual/net/Wireguard, iface: Wireguard)
Nov 27 11:48:10 lilith NetworkManager[25167]: <info>  [1543337290.4814] device added (path: /sys/devices/virtual/net/Wireguard, iface: Wireguard): no ifupdown configuration found.
Nov 27 11:48:10 lilith NetworkManager[25167]: [#] ip address add 10.2.2.1/8 dev Wireguard
Nov 27 11:48:10 lilith NetworkManager[25167]: [#] ip link set mtu 1420 dev Wireguard
Nov 27 11:48:10 lilith NetworkManager[25167]: [#] ip link set Wireguard up
Nov 27 11:48:10 lilith nm-wireguard-se[11054]: g_variant_new_string: assertion 'g_utf8_validate (string, -1, NULL)' failed
Nov 27 11:48:10 lilith nm-wireguard-se[11054]: g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed

you can see there is a failed assertion around where the call to wg-quick should be setting DNS using resolvconf. The output of wg-quick directly (for comparison) is

[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip address add 10.2.2.1/8 dev wg0
[#] ip link set mtu 1420 dev wg0
[#] ip link set wg0 up
[#] resolvconf -a tun.wg0 -m 0 -x

The settings in my configuration file are the same as the ones entered into the networkmanager GUI

@Queuecumber
Copy link
Contributor Author

I modified the code to print out what its seeing as the DNS settings and I get

Nov 27 16:15:38 lilith NetworkManager[23099]: !!!! DNS Setting ('@a{sv} {}')

the '@a{sv} {}' is the value it sees. Not sure if I'm printing it wrong or if this is the problem

@Queuecumber
Copy link
Contributor Author

OK it wasn't that, its just that the DNS settings arent being written to the config file which wg-quick uses.
@Druco Was this known about? Your commit message implies DNS works.

Anyway I fixed it so I will prepare a PR

@intika
Copy link

intika commented Nov 30, 2018

Thanks for this and for the pr, i did noticed this but did not had the time to investigate, great news thanks again :) 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants