From 4663d3ceacc4e6853b598a0bf72fe3bab44fcf38 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 27 May 2016 12:49:09 +0200 Subject: [PATCH] vpn,dns: for interface-less VPN connections get the ip_iface from the parent device Since 027f4c65ace4ad52ee9ccf4c1d9adad01eb67735, the ip_iface for nm_dns_manager_add_ip_config() must be set. Wit interface-less VPN types like libreswan, we thus hit the assertion nm_dns_manager_add_ip_config: assertion 'iface && iface[0]' failed Fix that, by fallback to the interface name of the parent device. Fixes: 027f4c65ace4ad52ee9ccf4c1d9adad01eb67735 (cherry picked from commit 3f8a60def635afb613a88602ffd4d4f88f622e92) --- src/nm-default-route-manager.c | 2 +- src/nm-policy.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nm-default-route-manager.c b/src/nm-default-route-manager.c index 7aebd295d0..6f72ee842a 100644 --- a/src/nm-default-route-manager.c +++ b/src/nm-default-route-manager.c @@ -1141,7 +1141,7 @@ _ipx_get_best_config (const VTableIP *vtable, if (out_ac) *out_ac = NM_ACTIVE_CONNECTION (vpn); if (out_ip_iface) - *out_ip_iface = nm_vpn_connection_get_ip_iface (vpn, FALSE); + *out_ip_iface = nm_vpn_connection_get_ip_iface (vpn, TRUE); } else { NMDevice *device = entry->source.device; NMActRequest *req; diff --git a/src/nm-policy.c b/src/nm-policy.c index 1c2081eb8e..9613ad8286 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -1442,7 +1442,7 @@ vpn_connection_activated (NMPolicy *self, NMVpnConnection *vpn) nm_dns_manager_begin_updates (priv->dns_manager, __func__); - ip_iface = nm_vpn_connection_get_ip_iface (vpn, FALSE); + ip_iface = nm_vpn_connection_get_ip_iface (vpn, TRUE); /* Add the VPN connection's IP configs from DNS */