+static int parse_one_dns_config(struct config *config,
+ char *confstr)
+{
+ char *tok, *saveptr;
+
+ for (tok = strtok_r(confstr, ",", &saveptr); tok;
+ tok = strtok_r(NULL, ",", &saveptr)) {
+
+ char *server = talloc_strdup(config, tok);
+
+ config->network.dns_servers = talloc_realloc(config,
+ config->network.dns_servers, const char *,
+ ++config->network.n_dns_servers);
+
+ config->network.dns_servers[config->network.n_dns_servers - 1]
+ = server;
+ }
+
+ return 0;
+}
+