]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
resolve: Remove comment when using resolvconf(8)
authorTobias Brunner <tobias@strongswan.org>
Fri, 13 Sep 2013 08:34:03 +0000 (10:34 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 13 Sep 2013 12:13:21 +0000 (14:13 +0200)
Since comments in resolv.conf are only valid at the beginning of a line
resolvconf(8) seems to have started treating any text after
'nameserver <ip>' as additional IP addresses for name servers.

Since it ignores comments, and we can easily remove the added servers
again, there is no point to add any.

Fixes #410.

src/libhydra/plugins/resolve/resolve_handler.c

index 6c57fa0bf79abc6990484cb596c879db9027e070..2eee854a96a4f1e76d7e0d67be4951ec03493596 100644 (file)
@@ -170,8 +170,7 @@ static bool invoke_resolvconf(private_resolve_handler_t *this,
                        return FALSE;
                }
                DBG1(DBG_IKE, "installing DNS server %H via resolvconf", addr);
-               fprintf(out, "nameserver %H   # by strongSwan, from %Y\n", addr,
-                               server);
+               fprintf(out, "nameserver %H\n", addr);
                success = !ferror(out);
                if (pclose(out))
                {