diff options
author | Clayton Craft <clayton@craftyguy.net> | 2023-03-08 15:35:05 +0000 |
---|---|---|
committer | Simon Kelley <simon@thekelleys.org.uk> | 2023-03-08 15:35:05 +0000 |
commit | ef5aac95d4391fb1290fd76a3826b2851e589bbc (patch) | |
tree | f6905e7ef7ae05244faed5c563e72e62d6668bbe | |
parent | ef8e930e4295265b8f46898a8e166f17d7f8ddc8 (diff) | |
download | dnsmasq-ef5aac95d4391fb1290fd76a3826b2851e589bbc.tar.gz |
Allow configuring filter-A/AAAA via dbus.
-rw-r--r-- | dbus/DBus-interface | 8 | ||||
-rw-r--r-- | src/dbus.c | 14 |
2 files changed, 22 insertions, 0 deletions
diff --git a/dbus/DBus-interface b/dbus/DBus-interface index 59b41b1..00b4465 100644 --- a/dbus/DBus-interface +++ b/dbus/DBus-interface @@ -44,6 +44,14 @@ SetFilterWin2KOption -------------------- Takes boolean, sets or resets the --filterwin2k option. +SetFilterA +------------------------ +Takes boolean, sets or resets the --filter-A option. + +SetFilterAAAA +------------------------ +Takes boolean, sets or resets the --filter-AAAA option. + SetBogusPrivOption ------------------ Takes boolean, sets or resets the --bogus-priv option. @@ -52,6 +52,12 @@ const char* introspection_xml_template = " <method name=\"SetFilterWin2KOption\">\n" " <arg name=\"filterwin2k\" direction=\"in\" type=\"b\"/>\n" " </method>\n" +" <method name=\"SetFilterA\">\n" +" <arg name=\"filter-a\" direction=\"in\" type=\"b\"/>\n" +" </method>\n" +" <method name=\"SetFilterAAAA\">\n" +" <arg name=\"filter-aaaa\" direction=\"in\" type=\"b\"/>\n" +" </method>\n" " <method name=\"SetLocaliseQueriesOption\">\n" " <arg name=\"localise-queries\" direction=\"in\" type=\"b\"/>\n" " </method>\n" @@ -817,6 +823,14 @@ DBusHandlerResult message_handler(DBusConnection *connection, { reply = dbus_set_bool(message, OPT_FILTER, "filterwin2k"); } + else if (strcmp(method, "SetFilterA") == 0) + { + reply = dbus_set_bool(message, OPT_FILTER_A, "filter-A"); + } + else if (strcmp(method, "SetFilterAAAA") == 0) + { + reply = dbus_set_bool(message, OPT_FILTER_AAAA, "filter-AAAA"); + } else if (strcmp(method, "SetLocaliseQueriesOption") == 0) { reply = dbus_set_bool(message, OPT_LOCALISE, "localise-queries"); |