diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2016-11-03 21:44:29 +0100 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2016-11-08 11:17:10 +0100 |
commit | a50243ea1f1fe28239a57283ef3a5ec6e8577dfb (patch) | |
tree | fc00365af1b57e77d5e68e6e8a6ce4329eee8db4 /package/network | |
parent | bc4109845db67ff424570e03ad1bc59adf76817a (diff) | |
download | upstream-a50243ea1f1fe28239a57283ef3a5ec6e8577dfb.tar.gz upstream-a50243ea1f1fe28239a57283ef3a5ec6e8577dfb.tar.bz2 upstream-a50243ea1f1fe28239a57283ef3a5ec6e8577dfb.zip |
dnsmasq: Support add-mac option
Adds the mac address of the DNS requestor to DNS queries which
are forwarded upstream and can be used to do filtering by the
upstream servers. This only works if the requestor is on the
same subnet as the dnsmasq server
The addmac parameter can hold the following values:
0 : mac address is not added
1 : mac address is added in binary format
base64 : mac address is added base64 encoded
text: : mac address is added in human readable format
as hex and colons
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'package/network')
-rw-r--r-- | package/network/services/dnsmasq/Makefile | 2 | ||||
-rw-r--r-- | package/network/services/dnsmasq/files/dnsmasq.init | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index 804242f4e1..861cda7fbe 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.76 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz 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 7612830103..b1f9e2e290 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -660,6 +660,12 @@ dnsmasq_start() append_bool "$cfg" dnsseccheckunsigned "--dnssec-check-unsigned" } + config_get addmac "$cfg" addmac 0 + [ "$addmac" != "0" ] && { + [ "$addmac" = "1" ] && addmac= + xappend "--add-mac${addmac:+="$addmac"}" + } + dhcp_option_add "$cfg" "" 0 xappend "--dhcp-broadcast=tag:needs-broadcast" |