diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-11-08 22:36:33 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-11-08 22:36:33 +0100 |
commit | 4f548ae3ea98933db41973dc8c8c6926fbb35f76 (patch) | |
tree | 97a2564b7b4a356e696de8b7ff751e19a369cc47 | |
parent | 3e37ffd2597846830836bfa1159ee7e615ea6f0f (diff) |
WIP: fix config
-rw-r--r-- | config.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -307,7 +307,7 @@ config_init_rules(void) } static unsigned int -lookup_global_integer(const char *name, unsigned int default_value) +lookup_uint(const char *name, unsigned int default_value) { const char *value = uci_lookup_option_string( uci_ctx, globals, name); @@ -329,12 +329,14 @@ config_init_globals(void) uci_ctx, globals, "ula_prefix"); interface_ip_set_ula_prefix(ula_prefix); - unsigned int priority_addr = lookup_global_integer( - "priority_addr", IPRULE_PRIORITY_ADDR); + unsigned int priority_addr = lookup_uint( + globals, "priority_addr", + IPRULE_PRIORITY_ADDR); interface_ip_set_addr_priority(priority_addr); - unsigned int priority_addr_mask = lookup_global_integer( - "priority_addr_mask", IPRULE_PRIORITY_ADDR_MASK); + unsigned int priority_addr_mask = lookup_uint( + globals, "priority_addr_mask", + IPRULE_PRIORITY_ADDR_MASK); interface_ip_set_addr_priority_mask(priority_addr_mask); } |