- free(mode);
- } else
- routing_mode = RMODE_ROUTER;
-
- choice = true;
- get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice);
- get_config_bool(lookup_config(config_tree, "PMTUDiscovery"), &choice);
- if(choice)
- myself->options |= OPTION_PMTU_DISCOVERY;
-
- choice = true;
- get_config_bool(lookup_config(config_tree, "ClampMSS"), &choice);
- get_config_bool(lookup_config(myself->connection->config_tree, "ClampMSS"), &choice);
- if(choice)
- myself->options |= OPTION_CLAMP_MSS;
-
- get_config_bool(lookup_config(config_tree, "PriorityInheritance"), &priorityinheritance);
-
-#if !defined(SOL_IP) || !defined(IP_TOS)
- if(priorityinheritance)
- logger(LOG_WARNING, "%s not supported on this platform", "PriorityInheritance");
-#endif
-
- if(!get_config_int(lookup_config(config_tree, "MACExpire"), &macexpire))
- macexpire = 600;
-
- if(get_config_int(lookup_config(config_tree, "MaxTimeout"), &maxtimeout)) {
- if(maxtimeout <= 0) {
- logger(LOG_ERR, "Bogus maximum timeout!");
- return false;
- }
- } else
- maxtimeout = 900;
-
- if(get_config_string(lookup_config(config_tree, "AddressFamily"), &afname)) {
- if(!strcasecmp(afname, "IPv4"))
- addressfamily = AF_INET;
- else if(!strcasecmp(afname, "IPv6"))
- addressfamily = AF_INET6;
- else if(!strcasecmp(afname, "any"))
- addressfamily = AF_UNSPEC;
- else {
- logger(LOG_ERR, "Invalid address family!");
- return false;
- }
- free(afname);
- }