summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2015-05-12 13:11:52 +0200
committerSteven Barth <steven@midlink.org>2015-05-12 19:24:53 +0200
commit6906beee9df0942fc4e8f27faa8dd3c6ef32cfd7 (patch)
tree7e84dea00b647e5c256c59aa8e53e1d8b96f0cff /config.c
parentd0dcf744ba054c9b572be63519b1415685353c8d (diff)
downloadnetifd-6906beee9df0942fc4e8f27faa8dd3c6ef32cfd7.tar.gz
netifd: Support for configurable default packet steering behavior
The default packet steering behavior can be configured via the parameter default_ps in the global section; the default value is true to keep backwards compatibility. Device packet steering (rps/xps) config can still be used to override the default behavior. This allows you to disable packet steering for all devices without the need to define a device config list which disables receive/transmit packet steering Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'config.c')
-rw-r--r--config.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/config.c b/config.c
index 48c4fbf..5d3db9f 100644
--- a/config.c
+++ b/config.c
@@ -306,6 +306,12 @@ config_init_globals(void)
const char *ula_prefix = uci_lookup_option_string(
uci_ctx, globals, "ula_prefix");
interface_ip_set_ula_prefix(ula_prefix);
+
+ const char *default_ps = uci_lookup_option_string(
+ uci_ctx, globals, "default_ps");
+
+ if (default_ps)
+ device_set_default_ps(strcmp(default_ps, "1") ? false : true);
}
static void