[openwrt/openwrt] umdns: add firewall rule for configured interfaces
LEDE Commits
lede-commits at lists.infradead.org
Sat Feb 8 13:33:19 PST 2025
nbd pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/122b637889c4bd3463e2ca4f07008b067ac19591
commit 122b637889c4bd3463e2ca4f07008b067ac19591
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Feb 8 22:27:27 2025 +0100
umdns: add firewall rule for configured interfaces
Makes it easier to enable MDNS on wan without having to edit the firewall
configuration for it
Signed-off-by: Felix Fietkau <nbd at nbd.name>
(cherry picked from commit 05138fe898ce2d102795bdc979a6d874a3d24424)
---
package/network/services/umdns/files/umdns.init | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/package/network/services/umdns/files/umdns.init b/package/network/services/umdns/files/umdns.init
index e9a2c05e09..61b2a338d6 100644
--- a/package/network/services/umdns/files/umdns.init
+++ b/package/network/services/umdns/files/umdns.init
@@ -35,6 +35,23 @@ start_service() {
procd_set_param command "$PROG"
[ -f /etc/seccomp/umdns.json ] && procd_set_param seccomp /etc/seccomp/umdns.json
procd_set_param respawn
+
+ procd_open_data
+ json_add_array firewall
+
+ for n in $network; do
+ json_add_object ""
+ json_add_string type rule
+ json_add_string proto udp
+ json_add_string src "$n"
+ json_add_int dest_port 5353
+ json_add_string target ACCEPT
+ json_close_object
+ done
+
+ json_close_array
+ procd_close_data
+
procd_open_trigger
procd_add_config_trigger "config.change" "umdns" /etc/init.d/umdns reload
for n in $network; do
More information about the lede-commits
mailing list