diff options
author | Loic Poulain <loic.poulain@linaro.org> | 2020-12-16 14:01:53 +0100 |
---|---|---|
committer | Loic Poulain <loic.poulain@linaro.org> | 2021-04-21 12:53:16 +0200 |
commit | b1db6527cf9d4801e48dfe6e9fe8124532269159 (patch) | |
tree | 6b795a3ac433f981477b2c6eae7ef4f53f308870 /src/mm-filter.c | |
parent | aaf8c17e3592cf401913543452002e1e227a8d05 (diff) |
filter: Add wwan port devices
Allow WWAN control ports.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Diffstat (limited to 'src/mm-filter.c')
-rw-r--r-- | src/mm-filter.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mm-filter.c b/src/mm-filter.c index 3bc84e17..cdfc5448 100644 --- a/src/mm-filter.c +++ b/src/mm-filter.c @@ -215,6 +215,13 @@ mm_filter_port (MMFilter *self, return TRUE; } + /* If this is a wwan port/device, we always allow it */ + if ((self->priv->enabled_rules & MM_FILTER_RULE_WWAN) && + (g_strcmp0 (subsystem, "wwan") == 0)) { + mm_obj_dbg (self, "(%s/%s) port allowed: wwan device", subsystem, name); + return TRUE; + } + /* If this is a tty device, we may allow it */ if ((self->priv->enabled_rules & MM_FILTER_RULE_TTY) && (g_strcmp0 (subsystem, "tty") == 0)) { @@ -467,6 +474,7 @@ mm_filter_new (MMFilterRule enabled_rules, mm_obj_dbg (self, " net devices allowed: %s", RULE_ENABLED_STR (MM_FILTER_RULE_NET)); mm_obj_dbg (self, " usbmisc devices allowed: %s", RULE_ENABLED_STR (MM_FILTER_RULE_USBMISC)); mm_obj_dbg (self, " rpmsg devices allowed: %s", RULE_ENABLED_STR (MM_FILTER_RULE_RPMSG)); + mm_obj_dbg (self, " wwan devices allowed: %s", RULE_ENABLED_STR (MM_FILTER_RULE_WWAN)); if (self->priv->enabled_rules & MM_FILTER_RULE_TTY) { mm_obj_dbg (self, " tty devices:"); mm_obj_dbg (self, " blacklist applied: %s", RULE_ENABLED_STR (MM_FILTER_RULE_TTY_BLACKLIST)); |