Currently, we have a bug where newly-configured DNS servers are appended
to the existing set of servers, rather than replacing them.
This change clears the existing servers out before adding the
newly-configured ones.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
}
str = widget_textbox_get_value(screen->widgets.dns_f);
+ talloc_free(config->network.dns_servers);
+ config->network.dns_servers = NULL;
+ config->network.n_dns_servers = 0;
+
if (str && strlen(str)) {
char *dns, *tmp;
int i;