We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a7847e commit f14da63Copy full SHA for f14da63
1 file changed
src/config.c
@@ -296,6 +296,18 @@ int load_config(struct vpn_config *cfg, const char *filename)
296
} else if (strcmp(key, "realm") == 0) {
297
strncpy(cfg->realm, val, REALM_SIZE);
298
cfg->realm[REALM_SIZE] = '\0';
299
+ } else if (strcmp(key, "tun") == 0) {
300
+ long tun = strtol(val, NULL, 0);
301
+
302
+ if (tun < 0 || tun > 1) {
303
+ log_warn("Bad tun option in configuration file: \"%ld\".\n",
304
+ tun);
305
+ continue;
306
+ }
307
+ cfg->tun = tun;
308
+ } else if (strcmp(key, "tun-ifname") == 0) {
309
+ free(cfg->tun_ifname);
310
+ cfg->tun_ifname = strdup(val);
311
} else if (strcmp(key, "set-dns") == 0) {
312
int set_dns = strtob(val);
313
0 commit comments