Return EOPNOTSUPP if user tries to activate ethernet tethering and AllowEthernetTethering variable is not set in main.conf --- src/technology.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/src/technology.c b/src/technology.c index f15fbd9..62950e7 100644 --- a/src/technology.c +++ b/src/technology.c @@ -787,6 +787,13 @@ static DBusMessage *set_property(DBusConnection *conn, if (type != DBUS_TYPE_BOOLEAN) return __connman_error_invalid_arguments(msg); + if (technology->type == CONNMAN_SERVICE_TYPE_ETHERNET && + connman_setting_get_bool("AllowEthernetTethering") + == FALSE) { + DBG("Ethernet tethering not allowed by config file"); + return __connman_error_not_supported(msg); + } + dbus_message_iter_get_basic(&value, &tethering); if (technology->tethering == tethering) { -- 1.7.11.7 _______________________________________________ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman