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 dec13573ea9651b9b6a4db6916fe17f6bb6baf25..5fc01a6b0b1ccce5f592fcd56ec676441224b8ef 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)