aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/dnsmasq/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2013-10-11 18:33:15 +0000
committerJo-Philipp Wich <jow@openwrt.org>2013-10-11 18:33:15 +0000
commitc081113e4429acf90b6198a36491f9545891e132 (patch)
tree4ab2f30d4ed758e2081fbae8d2a6292e4cb5e942 /package/network/services/dnsmasq/files
parent5b2fa1ed8969594397b6823815b2aa84abfb4825 (diff)
downloadupstream-c081113e4429acf90b6198a36491f9545891e132.tar.gz
upstream-c081113e4429acf90b6198a36491f9545891e132.tar.bz2
upstream-c081113e4429acf90b6198a36491f9545891e132.zip
dnsmasq: add option broadcast to host sections
There are certain consumer devices which are outliers in protocol conformance. An example is Samsung bluray players, which require broadcast DHCP responses (on Ethernet only, strangely not on Wifi). By specifying: config host ... option broadcast 1 this will enable the response to be sent as an Ethernet broadcast and not as a unicast. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38365 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services/dnsmasq/files')
-rw-r--r--package/network/services/dnsmasq/files/dnsmasq.init7
1 files changed, 6 insertions, 1 deletions
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 560928b764..561f89d33d 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -163,6 +163,8 @@ dnsmasq() {
dhcp_option_add "$cfg" "" 0
+ xappend "--dhcp-broadcast=tag:needs-broadcast"
+
echo >> $CONFIGFILE
}
@@ -270,7 +272,10 @@ dhcp_host_add() {
config_get tag "$cfg" tag
- xappend "--dhcp-host=$macs${networkid:+,net:$networkid}${tag:+,set:$tag}${ip:+,$ip}${name:+,$name}"
+ config_get_bool broadcast "$cfg" broadcast 0
+ [ "$broadcast" = "0" ] && broadcast=
+
+ xappend "--dhcp-host=$macs${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip}${name:+,$name}"
}
dhcp_tag_add() {