aboutsummaryrefslogtreecommitdiffstats
path: root/package/dnsmasq/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-07-01 11:32:29 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-07-01 11:32:29 +0000
commit93d0ae9729602d860af19c23b97f931170dd5005 (patch)
tree8dee1b7636d7aa0a20e1813f5f050a45f78cc2cb /package/dnsmasq/files
parent3686cbd5ca2e928639ffd11f6497aa79d9ca24ac (diff)
downloadmaster-187ad058-93d0ae9729602d860af19c23b97f931170dd5005.tar.gz
master-187ad058-93d0ae9729602d860af19c23b97f931170dd5005.tar.bz2
master-187ad058-93d0ae9729602d860af19c23b97f931170dd5005.zip
[PATCH 1/4] package/dnsmasq: permit dhcp_option in global dnsmasq config section
dnsmasq currently permits dhcp_options to be specified only in "config dhcp" sections of /etc/config/dhcp. When dnsmasq is providing DHCP service for multiple subnets and there are multiple "config dhcp" sections without "option ignore", it makes sense to allow dhcp_options that should apply globally in the "config dnsmasq" section of /etc/config/dhcp. dhcp_option is a list option. [jow: rework patch to apply after dhcp-option-force handling got introduced] Signed-off-by: Mark Mentovai <mark@moxienet.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32568 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/dnsmasq/files')
-rw-r--r--package/dnsmasq/files/dnsmasq.init4
1 files changed, 3 insertions, 1 deletions
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
index 92e10ee494..a1334d05fc 100644
--- a/package/dnsmasq/files/dnsmasq.init
+++ b/package/dnsmasq/files/dnsmasq.init
@@ -143,6 +143,8 @@ dnsmasq() {
config_list_foreach "$cfg" rebind_domain append_rebind_domain
}
+ dhcp_option_add "$cfg" "" 0
+
echo >> $CONFIGFILE
}
@@ -362,7 +364,7 @@ dhcp_option_add() {
config_get dhcp_option "$cfg" dhcp_option
for o in $dhcp_option; do
- xappend "--dhcp-option${force:+-force}=$networkid","$o"
+ xappend "--dhcp-option${force:+-force}=${networkid:+$networkid,}$o"
done
}