+/*
+ * netifd - network interface daemon
+ * Copyright (C) 2012 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
fprintf(f, "# Interface %s\n", iface->name);
write_resolv_conf_entries(f, &iface->config_ip);
- write_resolv_conf_entries(f, &iface->proto_ip);
+ if (!iface->proto_ip.no_dns)
+ write_resolv_conf_entries(f, &iface->proto_ip);
}
fclose(f);
if (rename(path, resolv_conf) < 0) {
void
interface_ip_update_start(struct interface_ip_settings *ip)
{
- vlist_simple_update(&ip->dns_servers);
- vlist_simple_update(&ip->dns_search);
+ if (ip != &ip->iface->config_ip) {
+ vlist_simple_update(&ip->dns_servers);
+ vlist_simple_update(&ip->dns_search);
+ }
vlist_update(&ip->route);
vlist_update(&ip->addr);
}