Signed-off-by: Yousong Zhou <yszhou4t...@gmail.com> --- v1 -> v2 Rebase it on the lastest trunk.
package/network/services/dnsmasq/Makefile | 18 ++++++++++++++++-- .../network/services/dnsmasq/files/dnsmasq.init | 5 +++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index 8e2d41c..c13eb5c 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq PKG_VERSION:=2.71 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq @@ -59,11 +59,25 @@ define Package/dnsmasq/conffiles /etc/dnsmasq.conf endef +define Package/dnsmasq/config/Default + config PACKAGE_dnsmasq_$(1)_ipset + bool "Build with ipset support" + default n + config PACKAGE_dnsmasq_$(1)_auth + bool "Build with the facility to act as an authoritative DNS server." + default n +endef + +Package/dnsmasq/config=$(call Package/dnsmasq/config/Default,nodhcpv6) +Package/dnsmasq-dhcpv6/config=$(call Package/dnsmasq/config/Default,dhcpv6) + Package/dnsmasq-dhcpv6/conffiles = $(Package/dnsmasq/conffiles) TARGET_CFLAGS += \ -ffunction-sections -fdata-sections \ - $(if $(CONFIG_IPV6),,-DNO_IPV6) -DNO_IPSET -DNO_AUTH + $(if $(CONFIG_IPV6),,-DNO_IPV6) \ + $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_ipset),,-DNO_IPSET) \ + $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_auth),,-DNO_AUTH) ifeq ($(BUILD_VARIANT),nodhcpv6) TARGET_CFLAGS += -DNO_DHCP6 diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index f7edb28..6c0927f 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -84,6 +84,10 @@ append_address() { xappend "--address=$1" } +append_ipset() { + xappend "--ipset=$1" +} + append_interface() { local ifname=$(uci_get_state network "$1" ifname "$1") xappend "--interface=$ifname" @@ -134,6 +138,7 @@ dnsmasq() { append_parm "$cfg" "local" "--server" config_list_foreach "$cfg" "server" append_server config_list_foreach "$cfg" "address" append_address + config_list_foreach "$cfg" "ipset" append_ipset config_list_foreach "$cfg" "interface" append_interface config_list_foreach "$cfg" "notinterface" append_notinterface config_list_foreach "$cfg" "addnhosts" append_addnhosts -- 1.7.2.5 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel