From 5fe8b42f0d0405cb34d11bf4cf74392fa7224e3a Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 23 Jan 2010 10:41:48 +0100 Subject: [PATCH] Ignore resolvers with no interface for resolvconf --- plugins/resolvconf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/resolvconf.c b/plugins/resolvconf.c index 9067b60..2726a78 100644 --- a/plugins/resolvconf.c +++ b/plugins/resolvconf.c @@ -45,6 +45,9 @@ static int resolvconf_append(const char *interface, const char *domain, if (access(RESOLVCONF, X_OK) < 0) return -errno; + if (interface == NULL) + return 0; + cmd = g_strdup_printf("echo \"nameserver %s\" | %s -a %s", server, RESOLVCONF, interface); @@ -65,6 +68,9 @@ static int resolvconf_remove(const char *interface, const char *domain, DBG("interface %s server %s", interface, server); + if (interface == NULL) + return 0; + cmd = g_strdup_printf("%s -d %s", RESOLVCONF, interface); DBG("%s", cmd); -- 2.7.4