diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2013-10-11 18:33:15 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2013-10-11 18:33:15 +0000 |
commit | 78f69b66d44f8e9e9459ca3650d233b45252fd4e (patch) | |
tree | 08df80d90f1b8f9a89e46ead0fb1d0ac67509c81 /package/network/services/dnsmasq | |
parent | 5f272ca8132c277fb77c9970881cb6c8165040b1 (diff) | |
download | mtk-20170518-78f69b66d44f8e9e9459ca3650d233b45252fd4e.zip mtk-20170518-78f69b66d44f8e9e9459ca3650d233b45252fd4e.tar.gz mtk-20170518-78f69b66d44f8e9e9459ca3650d233b45252fd4e.tar.bz2 |
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>
SVN-Revision: 38365
Diffstat (limited to 'package/network/services/dnsmasq')
-rw-r--r-- | package/network/services/dnsmasq/Makefile | 2 | ||||
-rw-r--r-- | package/network/services/dnsmasq/files/dnsmasq.init | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index 6938ba1..ae3662b 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.66 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 560928b..561f89d 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() { |