- if(get_config_string(lookup_config(config_tree, "Mode"), &mode)) {
- if(!strcasecmp(mode, "router"))
- routing_mode = RMODE_ROUTER;
- else if(!strcasecmp(mode, "switch"))
- routing_mode = RMODE_SWITCH;
- else if(!strcasecmp(mode, "hub"))
- routing_mode = RMODE_HUB;
- else {
- logger(LOG_ERR, "Invalid routing mode!");
- return false;
- }
- 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;