diff options
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | Makefile.plugins | 12 | ||||
-rw-r--r-- | README | 17 | ||||
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | src/connman.h | 3 | ||||
-rw-r--r-- | src/dnsproxy.c (renamed from plugins/dnsproxy.c) | 15 | ||||
-rw-r--r-- | src/main.c | 2 |
7 files changed, 13 insertions, 47 deletions
diff --git a/Makefile.am b/Makefile.am index 4cbff38d..f09c78c4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -73,7 +73,8 @@ src_connmand_SOURCES = $(gdbus_sources) $(gdhcp_sources) \ src/wifi.c src/storage.c src/dbus.c src/config.c \ src/technology.c src/counter.c src/location.c \ src/session.c src/tethering.c src/ondemand.c \ - src/wpad.c src/wispr.c src/stats.c src/iptables.c + src/wpad.c src/wispr.c src/stats.c src/iptables.c \ + src/dnsproxy.c src_connmand_LDADD = $(builtin_libadd) @GLIB_LIBS@ @DBUS_LIBS@ \ @CAPNG_LIBS@ @XTABLES_LIBS@ -lresolv -ldl @@ -206,7 +207,6 @@ DISTCHECK_CONFIGURE_FLAGS = --disable-gtk-doc \ --enable-wifi \ --enable-bluetooth \ --enable-ofono \ - --enable-dnsproxy \ --enable-pacrunner \ --enable-google \ --enable-meego \ diff --git a/Makefile.plugins b/Makefile.plugins index 889705a3..d8ca1b1f 100644 --- a/Makefile.plugins +++ b/Makefile.plugins @@ -150,18 +150,6 @@ plugins_portal_la_LDFLAGS = $(plugin_ldflags) endif endif -if DNSPROXY -if DNSPROXY_BUILTIN -builtin_modules += dnsproxy -builtin_sources += plugins/dnsproxy.c -else -plugin_LTLIBRARIES += plugins/dnsproxy.la -plugin_objects += $(plugins_dnsproxy_la_OBJECTS) -plugins_dnsproxy_la_CFLAGS = $(plugin_cflags) -plugins_dnsproxy_la_LDFLAGS = $(plugin_ldflags) -endif -endif - if PACRUNNER if PACRUNNER_BUILTIN builtin_modules += pacrunner @@ -11,6 +11,7 @@ The following features are built-in into Connection Manager: - Generic plugin infrastructure - Device and network abstraction (with basic storage support) - IPv4, routing and DNS configuration + - DNS Proxy Various plugins can be enabled for networking support: - Ethernet plugin @@ -18,7 +19,6 @@ Various plugins can be enabled for networking support: - Bluetooth plugin Also plugins with additional features are available: - - Resolver plugin (DNS proxy) - Loopback setup - PolicyKit support @@ -59,21 +59,6 @@ For a working system, certain configuration options need to be enabled: Enable support for Bluetooth devices (requires BlueZ) - --enable-dnsproxy - - Enable DNS proxy support for /etc/resolv.conf abstraction - - The best solution for multiple connections and proper DNS - handling is a DNS proxy server. This binds a DNS proxy - server to port 53 on the loopback interface (127.0.0.1). - - The /etc/resolv.conf file needs a "nameserver 127.0.0.1" - entry, but can now set the immutable bit or be on a read-only - filesystem. No further modification to that file will be made. - - It is important that this is not used together with other - DNS proxy solution like dnsmasq. - --enable-loopback Enable setup of loopback device diff --git a/configure.ac b/configure.ac index 1bfff1e2..1d95c6d5 100644 --- a/configure.ac +++ b/configure.ac @@ -148,13 +148,6 @@ fi AM_CONDITIONAL(LOOPBACK, test "${enable_loopback}" != "no") AM_CONDITIONAL(LOOPBACK_BUILTIN, test "${enable_loopback}" = "builtin") -AC_ARG_ENABLE(dnsproxy, - AC_HELP_STRING([--enable-dnsproxy], [enable DNS proxy support]), - [enable_dnsproxy=${enableval}], [enable_dnsproxy="no"]) - -AM_CONDITIONAL(DNSPROXY, test "${enable_dnsproxy}" != "no") -AM_CONDITIONAL(DNSPROXY_BUILTIN, test "${enable_dnsproxy}" = "builtin") - AC_ARG_ENABLE(pacrunner, AC_HELP_STRING([--enable-pacrunner], [enable PAC runner support]), [enable_pacrunner=${enableval}], [enable_pacrunner="no"]) diff --git a/src/connman.h b/src/connman.h index 37946f66..9d8e46c0 100644 --- a/src/connman.h +++ b/src/connman.h @@ -611,3 +611,6 @@ void __connman_iptables_cleanup(void); int __connman_iptables_command(const char *format, ...) __attribute__((format(printf, 1, 2))); int __connman_iptables_commit(const char *table_name); + +int __connman_dnsproxy_init(void); +void __connman_dnsproxy_cleanup(void); diff --git a/plugins/dnsproxy.c b/src/dnsproxy.c index 60b7a394..f09368ca 100644 --- a/plugins/dnsproxy.c +++ b/src/dnsproxy.c @@ -33,14 +33,12 @@ #include <sys/socket.h> #include <netdb.h> +#include <glib.h> + #define CONNMAN_API_SUBJECT_TO_CHANGE -#include <connman/plugin.h> -#include <connman/resolver.h> -#include <connman/notifier.h> #include <connman/ondemand.h> -#include <connman/log.h> -#include <glib.h> +#include "connman.h" #if __BYTE_ORDER == __LITTLE_ENDIAN struct domain_hdr { @@ -1477,7 +1475,7 @@ static void destroy_listener(void) destroy_udp_listener(); } -static int dnsproxy_init(void) +int __connman_dnsproxy_init(void) { int err; @@ -1504,7 +1502,7 @@ destroy: return err; } -static void dnsproxy_exit(void) +void __connman_dnsproxy_cleanup(void) { connman_notifier_unregister(&dnsproxy_notifier); @@ -1512,6 +1510,3 @@ static void dnsproxy_exit(void) destroy_listener(); } - -CONNMAN_PLUGIN_DEFINE(dnsproxy, "DNS proxy resolver plugin", VERSION, - CONNMAN_PLUGIN_PRIORITY_DEFAULT, dnsproxy_init, dnsproxy_exit) @@ -224,6 +224,7 @@ int main(int argc, char *argv[]) __connman_config_init(); __connman_stats_init(); + __connman_dnsproxy_init(); __connman_resolver_init(); __connman_ipconfig_init(); __connman_rtnl_init(); @@ -261,6 +262,7 @@ int main(int argc, char *argv[]) __connman_rtnl_cleanup(); __connman_ipconfig_cleanup(); __connman_resolver_cleanup(); + __connman_dnsproxy_cleanup(); __connman_stats_cleanup(); __connman_config_cleanup(); |