DNS settings not changed for openvpn if resolvconf installed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
network-manager (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Binary package hint: network-manager
The patch package "network-
@@ -679,7 +734,10 @@
*/
gboolean nm_system_
{
- return TRUE;
+ if (g_find_
+ return FALSE;
+ else
+ return TRUE;
}
This means that if the resolvconf package is installed, then network_manager does not do it's internal magic as it is expecting resolvconf to look after the changes. However, if an openvpn connection is being managed by network_manager, then the DNS settings being pushed by the server are effectively ignored if resolvconf is installed as there are not resolvconf specific hooks for the openvpn stuff.
I am not sure which package I should file this against. I chose network_manager as it is the above patch that prevents network_manager from "manually" modifying DNS entries. However, this could also be a problem with network-
By the way, if resolvconf is not installed, then this all functions as expected and the openvpn DNS settings are correctly pushed to the client and /etc/resolv.conf is updated.
Looking further into the code, it looks like all VPN clients that can pass along nameserver information will suffer from this problem.
In src/vpn- manager/ nm-vpn- service. c, the function nm_vpn_ service_ stage4_ ip_config_ get parses the dbus message that contains the DNS information. It calls nm_vpn_ connection_ set_config which eventually calls nm_system_ should_ modify_ resolv_ conf. Normally, it seems that network-manager assumes that dhclient, for example, looks after updating /etc/resolv.conf if resolvconf is installed. There is no accounting for the case where a vpn client wishes to set DNS information and resolvconf is installed.
I am not sure of the cleanest way to fix this problem. There is currently no way to indicate to to network-manager that it is responsible for setting DNS settings, even if resolvconf is installed. It would be nice for a parameter to be added to the "config" data that indicates that network-manager should call resolvconf if the parameter is set and if resolvconf is installed. In other words, there should be three possibilities:
1. resolvconf is not installed, always modify /etc/resolv.conf manually
2. resolvconf is installed and another element, like dhclient, will look after calling resolvconf
3. resolvconf is installed and network-manager must call resolvconf OR modify /etc/resolv.conf manually.
It is case 3 that is currently not handled.