Disconnect service on removal if still connected
[connman] / src / ipv4.c
index 4518d97..b670cfd 100644 (file)
@@ -92,6 +92,9 @@ static int set_ipv4(struct connman_element *element,
 
        close(sk);
 
+       if (nameserver == NULL)
+               connman_error("No nameserver for %s defined", ifr.ifr_name);
+
        connman_resolver_append(ifr.ifr_name, NULL, nameserver);
 
        return 0;