Revert "networkmanager: connectivity check: set interface for DNS resolution"
The implemented patch fails when NetworkManager uses a local DNS cache
underneath (like 'dnsmasq'). To access the local DNS cache it needs to
use the loopback interface and hardcoding the physical interfaces make
the connectivity check fail.
This reverts commit c9b02d6288.
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
f68af9bda6
commit
9aa7c620aa
|
|
@ -1,38 +0,0 @@
|
|||
From: Javier Viguera <javier.viguera@digi.com>
|
||||
Date: Thu, 14 Sep 2017 13:29:52 +0200
|
||||
Subject: [PATCH] connectivity: configure network interface for DNS resolution
|
||||
|
||||
Use the same interface that it's being checked for the DNS resolution.
|
||||
|
||||
This makes connectivity check work in an scenario where the primary
|
||||
interface has lost connectivity (for example ethernet) but you still
|
||||
have connectivity through a secondary interface (e.g. wireless).
|
||||
|
||||
What happens in that case is that even though you have correct
|
||||
connectivity in the secondary interface the check fails because it does
|
||||
not use that secondary interface to resolve the name of the test URL.
|
||||
The result is that the connectivity check assumes that this secondary
|
||||
interface is also failing and it penalizes the metrics in the routing
|
||||
table.
|
||||
|
||||
This commit uses libcurl's CURLOPT_DNS_INTERFACE to set the DNS
|
||||
interface. Notice that this requires 'libcurl' to be compiled with
|
||||
'--enable-ares'.
|
||||
|
||||
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
|
||||
---
|
||||
src/nm-connectivity.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/nm-connectivity.c b/src/nm-connectivity.c
|
||||
index 6f16b28e56ca..c12f145c2ad8 100644
|
||||
--- a/src/nm-connectivity.c
|
||||
+++ b/src/nm-connectivity.c
|
||||
@@ -365,6 +365,7 @@ nm_connectivity_check_async (NMConnectivity *self,
|
||||
curl_easy_setopt (ehandle, CURLOPT_PRIVATE, cb_data);
|
||||
curl_easy_setopt (ehandle, CURLOPT_HTTPHEADER, cb_data->request_headers);
|
||||
curl_easy_setopt (ehandle, CURLOPT_INTERFACE, cb_data->ifspec);
|
||||
+ curl_easy_setopt (ehandle, CURLOPT_DNS_INTERFACE, iface);
|
||||
curl_multi_add_handle (priv->curl_mhandle, ehandle);
|
||||
|
||||
cb_data->timeout_id = g_timeout_add_seconds (30, timeout_cb, cb_data);
|
||||
|
|
@ -12,7 +12,6 @@ SRC_URI += " \
|
|||
file://nm.eth1.static \
|
||||
file://nm.wlan0.dhcp \
|
||||
file://nm.wlan0.static \
|
||||
file://0001-connectivity-configure-network-interface-for-DNS-res.patch \
|
||||
"
|
||||
|
||||
# 'polkit' depends on 'consolekit', and this requires 'x11' distro feature. So
|
||||
|
|
|
|||
Loading…
Reference in New Issue