mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Allow configuring filter-A/AAAA via dbus.
This commit is contained in:
committed by
Simon Kelley
parent
ef8e930e42
commit
ef5aac95d4
@@ -44,6 +44,14 @@ SetFilterWin2KOption
|
|||||||
--------------------
|
--------------------
|
||||||
Takes boolean, sets or resets the --filterwin2k option.
|
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
|
SetBogusPrivOption
|
||||||
------------------
|
------------------
|
||||||
Takes boolean, sets or resets the --bogus-priv option.
|
Takes boolean, sets or resets the --bogus-priv option.
|
||||||
|
|||||||
14
src/dbus.c
14
src/dbus.c
@@ -52,6 +52,12 @@ const char* introspection_xml_template =
|
|||||||
" <method name=\"SetFilterWin2KOption\">\n"
|
" <method name=\"SetFilterWin2KOption\">\n"
|
||||||
" <arg name=\"filterwin2k\" direction=\"in\" type=\"b\"/>\n"
|
" <arg name=\"filterwin2k\" direction=\"in\" type=\"b\"/>\n"
|
||||||
" </method>\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"
|
" <method name=\"SetLocaliseQueriesOption\">\n"
|
||||||
" <arg name=\"localise-queries\" direction=\"in\" type=\"b\"/>\n"
|
" <arg name=\"localise-queries\" direction=\"in\" type=\"b\"/>\n"
|
||||||
" </method>\n"
|
" </method>\n"
|
||||||
@@ -817,6 +823,14 @@ DBusHandlerResult message_handler(DBusConnection *connection,
|
|||||||
{
|
{
|
||||||
reply = dbus_set_bool(message, OPT_FILTER, "filterwin2k");
|
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)
|
else if (strcmp(method, "SetLocaliseQueriesOption") == 0)
|
||||||
{
|
{
|
||||||
reply = dbus_set_bool(message, OPT_LOCALISE, "localise-queries");
|
reply = dbus_set_bool(message, OPT_LOCALISE, "localise-queries");
|
||||||
|
|||||||
Reference in New Issue
Block a user