dnsmasq: Add EDNS0 Upstream support
authorCarsten Schuette <schuettecarsten@googlemail.com>
Wed, 17 Jul 2024 18:09:46 +0000 (20:09 +0200)
committerRobert Marko <robimarko@gmail.com>
Sat, 24 Aug 2024 19:25:17 +0000 (21:25 +0200)
Forward client mac address and subnet on dns queries. Pi-hole and Adguard use this feature to send the originators ip address/subnet so it can be logged and not just the nat address of the router. This feature has been added since version 2.56 of dnsmasq and would be nice to expose this feature in openwrt.

Signed-off-by: Carsten Schuette <schuettecarsten@googlemail.com>
Link: https://github.com/openwrt/openwrt/pull/15965
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/network/services/dnsmasq/Makefile
package/network/services/dnsmasq/files/dnsmasq.init

index 5224e996a49a06a8e8e52d521b94d7060dbbfd24..0a597c03ce405b078b67b8c4b52835b2d91f72b5 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=dnsmasq
 PKG_UPSTREAM_VERSION:=2.90
 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION)))
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz
 PKG_SOURCE_URL:=https://thekelleys.org.uk/dnsmasq/
index 138a913f87f3d9667bbfebe07e4ee01c2b31fe2d..4cfb1554240b2b17b6952ce318d90bb806352758 100755 (executable)
@@ -1108,6 +1108,9 @@ dnsmasq_start()
                [ "$addmac" = "1" ] && addmac=
                xappend "--add-mac${addmac:+="$addmac"}"
        }
+       append_bool "$cfg" stripmac "--strip-mac"
+       append_parm "$cfg" addsubnet "--add-subnet"
+       append_bool "$cfg" stripsubnet "--strip-subnet"
 
        dhcp_option_add "$cfg" "" 0
        dhcp_option_add "$cfg" "" 2