mirror of
https://github.com/hak5/wifipineapple-openwrt.git
synced 2025-10-29 16:57:19 +00:00
igmpproxy: do not start instance if no upstream interface is available
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43659 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
dfd221ae14
commit
6a21992011
@ -48,6 +48,8 @@ igmp_add_phyint() {
|
||||
return;
|
||||
}
|
||||
|
||||
[[ "$direction" = "upstream" ]] && has_upstream=1
|
||||
|
||||
echo -e "\nphyint $device $direction ratelimit 0 threshold 1" >> /var/etc/igmpproxy.conf
|
||||
|
||||
if [ -n "$altnets" ]; then
|
||||
@ -104,11 +106,14 @@ service_triggers() {
|
||||
}
|
||||
|
||||
start_service() {
|
||||
has_upstream=
|
||||
config_load igmpproxy
|
||||
|
||||
procd_open_instance
|
||||
config_foreach igmp_header igmpproxy
|
||||
config_foreach igmp_add_phyint phyint
|
||||
[ -n "$has_upstream" ] || return
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command $PROG
|
||||
[ -n "$OPTIONS" ] && procd_append_param $OPTIONS
|
||||
procd_append_param command $CONFIGFILE
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user