diff options
author | Thomas Haller <thaller@redhat.com> | 2016-05-27 12:49:09 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-05-27 12:54:55 +0200 |
commit | 3f8a60def635afb613a88602ffd4d4f88f622e92 (patch) | |
tree | a455744b4798805b9e17e9f75b3db268181722a1 | |
parent | 18501d7b684fe5e56fcb81798660e66de7bcae10 (diff) | |
download | NetworkManager-3f8a60def635afb613a88602ffd4d4f88f622e92.tar.gz |
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
-rw-r--r-- | src/nm-default-route-manager.c | 2 | ||||
-rw-r--r-- | 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 */ |