Skip to content

Commit

Permalink
dnsmasq: add 'scriptarp' option
Browse files Browse the repository at this point in the history
Add option 'scriptarp' to uci dnsmasq config to enable --script-arp functions.
The default setting is false, meaning any scripts in `/etc/hotplug.d/neigh` intended
to be triggered by `/usr/lib/dnsmasq/dhcp-script.sh` will fail to execute.

Also enable --script-arp if has_handlers returns true.

Signed-off-by: Jordan Sokolic <oofnik@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
  • Loading branch information
oofnikj authored and dedeckeh committed Mar 22, 2020
1 parent f1f8700 commit 27ffd5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package/network/services/dnsmasq/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmasq
PKG_UPSTREAM_VERSION:=2.81rc3
PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION)))
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq/release-candidates
Expand Down
2 changes: 2 additions & 0 deletions package/network/services/dnsmasq/files/dnsmasq.init
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,7 @@ dnsmasq_start()
append_bool "$cfg" allservers "--all-servers"
append_bool "$cfg" noping "--no-ping"
append_bool "$cfg" rapidcommit "--dhcp-rapid-commit"
append_bool "$cfg" scriptarp "--script-arp"

append_parm "$cfg" logfacility "--log-facility"

Expand Down Expand Up @@ -915,6 +916,7 @@ dnsmasq_start()
config_get user_dhcpscript $cfg dhcpscript
if has_handler || [ -n "$user_dhcpscript" ]; then
xappend "--dhcp-script=$DHCPSCRIPT"
xappend "--script-arp"
fi

config_get leasefile $cfg leasefile "/tmp/dhcp.leases"
Expand Down

0 comments on commit 27ffd5e

Please sign in to comment.