From 3f8a60def635afb613a88602ffd4d4f88f622e92 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 --- 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 5d6e5ae016..2fd2c7db47 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 de6bc5d13b..8f23ce81e3 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -1441,7 +1441,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 */