support ipv6_first option in config file (#946)

This commit is contained in:
Rayson Zhu
2016-11-13 23:32:43 -06:00
committed by Max Lv
parent 73b4e682a7
commit d1765df9f9
4 changed files with 8 additions and 1 deletions
+2
View File
@@ -216,6 +216,8 @@ read_jconf(const char *file)
conf.mtu = value->u.integer;
} else if (strcmp(name, "mptcp") == 0) {
conf.mptcp = value->u.boolean;
} else if (strcmp(name, "ipv6_first") == 0) {
conf.ipv6_first = value->u.boolean;
}
}
} else {
+1
View File
@@ -63,6 +63,7 @@ typedef struct {
int mode;
int mtu;
int mptcp;
int ipv6_first;
} jconf_t;
jconf_t *read_jconf(const char *file);
+3
View File
@@ -1715,6 +1715,9 @@ main(int argc, char **argv)
if (conf->nameserver != NULL) {
nameservers[nameserver_num++] = conf->nameserver;
}
if (ipv6first == 0) {
ipv6first = conf->ipv6_first;
}
}
if (server_num == 0) {