mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-11 13:15:47 +00:00
umdns: add firewall rule for configured interfaces
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Makes it easier to enable MDNS on wan without having to edit the firewall configuration for it Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry picked from commit 05138fe898ce2d102795bdc979a6d874a3d24424)
This commit is contained in:
parent
8cd50a6aec
commit
122b637889
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user