igmpproxy: fix spurious restarts on interface events, pass used netdevs to procd instead
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 47055
This commit is contained in:
parent
38182373e0
commit
4e4b4c8cb5
1 changed files with 5 additions and 1 deletions
|
@ -51,6 +51,8 @@ igmp_add_phyint() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
append netdevs "$device"
|
||||||
|
|
||||||
[[ "$direction" = "upstream" ]] && has_upstream=1
|
[[ "$direction" = "upstream" ]] && has_upstream=1
|
||||||
|
|
||||||
echo -e "\nphyint $device $direction ratelimit 0 threshold 1" >> /var/etc/igmpproxy.conf
|
echo -e "\nphyint $device $direction ratelimit 0 threshold 1" >> /var/etc/igmpproxy.conf
|
||||||
|
@ -67,7 +69,7 @@ igmp_add_network() {
|
||||||
local network
|
local network
|
||||||
|
|
||||||
config_get network $1 network
|
config_get network $1 network
|
||||||
procd_add_interface_trigger "interface.*" $network /etc/init.d/igmpproxy restart
|
procd_add_interface_trigger "interface.*" $network /etc/init.d/igmpproxy reload
|
||||||
}
|
}
|
||||||
|
|
||||||
igmp_add_firewall_routing() {
|
igmp_add_firewall_routing() {
|
||||||
|
@ -110,6 +112,7 @@ service_triggers() {
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
has_upstream=
|
has_upstream=
|
||||||
|
netdevs=
|
||||||
config_load igmpproxy
|
config_load igmpproxy
|
||||||
|
|
||||||
config_foreach igmp_header igmpproxy
|
config_foreach igmp_header igmpproxy
|
||||||
|
@ -121,6 +124,7 @@ start_service() {
|
||||||
[ -n "$OPTIONS" ] && procd_append_param $OPTIONS
|
[ -n "$OPTIONS" ] && procd_append_param $OPTIONS
|
||||||
procd_append_param command $CONFIGFILE
|
procd_append_param command $CONFIGFILE
|
||||||
procd_set_param file $CONFIGFILE
|
procd_set_param file $CONFIGFILE
|
||||||
|
procd_set_param netdev $netdevs
|
||||||
procd_set_param respawn
|
procd_set_param respawn
|
||||||
procd_open_trigger
|
procd_open_trigger
|
||||||
config_foreach igmp_add_network phyint
|
config_foreach igmp_add_network phyint
|
||||||
|
|
Loading…
Reference in a new issue