With this commit the --address option of dnsmasq, directly returning ip addresses for certain domains instead of querying the dns server, can be configured in the dhcp uci configuration file. See the dnsmasq manpage for further details of this option.
Signed-off-by: Linus Lüssing <linus.luess...@web.de> --- package/dnsmasq/files/dhcp.conf | 1 + package/dnsmasq/files/dnsmasq.init | 5 +++++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/package/dnsmasq/files/dhcp.conf b/package/dnsmasq/files/dhcp.conf index 660b06a..5ba772e 100644 --- a/package/dnsmasq/files/dhcp.conf +++ b/package/dnsmasq/files/dhcp.conf @@ -15,6 +15,7 @@ config dnsmasq option leasefile '/tmp/dhcp.leases' option resolvfile '/tmp/resolv.conf.auto' #list server '/mycompany.local/1.2.3.4' + #list address '/whatever.domain/192.168.123.45' #option nonwildcard 1 #list interface br-lan #list notinterface lo diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init index cd5a78a..8334b38 100644 --- a/package/dnsmasq/files/dnsmasq.init +++ b/package/dnsmasq/files/dnsmasq.init @@ -41,6 +41,10 @@ append_server() { append args "-S $1" } +append_address() { + append args "-A $1" +} + append_interface() { local ifname=$(uci_get_state network "$1" ifname "$1") append args "-i $ifname" @@ -88,6 +92,7 @@ dnsmasq() { append_parm "$cfg" "domain" "-s" append_parm "$cfg" "local" "-S" config_list_foreach "$cfg" "server" append_server + config_list_foreach "$cfg" "address" append_address config_list_foreach "$cfg" "interface" append_interface config_list_foreach "$cfg" "notinterface" append_notinterface config_list_foreach "$cfg" "addnhosts" append_addnhosts -- 1.7.4.1 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel