- 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 {
- syslog(LOG_ERR, _("Invalid routing mode!"));
- return -1;
- }
- free(mode);
- } else
- routing_mode = RMODE_ROUTER;
-
- get_config_bool(lookup_config(config_tree, "PriorityInheritance"),
- &priorityinheritance);
-#if !defined(SOL_IP) || !defined(IP_TOS)
- if(priorityinheritance)
- syslog(LOG_WARNING, _("PriorityInheritance not supported on this platform"));
-#endif
-
- if(!get_config_int(lookup_config(config_tree, "MACExpire"), &macexpire))
- macexpire = 600;
-
- if(get_config_int
- (lookup_config(myself->connection->config_tree, "MaxTimeout"),
- &maxtimeout)) {
- if(maxtimeout <= 0) {
- syslog(LOG_ERR, _("Bogus maximum timeout!"));
- return -1;
- }
- } 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 {
- syslog(LOG_ERR, _("Invalid address family!"));
- return -1;
- }
- free(afname);
- } else
- addressfamily = AF_INET;