Ignore DNS servers without an interface for now
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 19 Dec 2009 05:21:08 +0000 (21:21 -0800)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 19 Dec 2009 05:21:08 +0000 (21:21 -0800)
src/resolver.c

index dec1357..5fc01a6 100644 (file)
@@ -328,6 +328,9 @@ static int resolvfile_append(const char *interface, const char *domain,
 
        DBG("interface %s server %s", interface, server);
 
+       if (interface == NULL)
+               return -ENOENT;
+
        fd = open("/etc/resolv.conf", O_RDWR | O_CREAT,
                                        S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
        if (fd < 0)