mcastmngr: handle multiple upstream interface sections

Do not overwrite mcast configuration if there are multiple interface
sections referring to the same upstream device such as wan/wan6
This commit is contained in:
Erik Karlsson 2024-04-19 16:50:04 +02:00
parent 35c5d54a76
commit 2214fd99e8

View file

@ -91,7 +91,7 @@ interfaces_ok(){
for itf in $up_interf; do
# check if there exist a interface section for this upstream interface, if yes the
# do nothing, if no then generate config as mcast config is outdated
local dev_section=$(uci show network | grep -E "\.device=\'$itf\'" | cut -d'.' -f2)
local dev_section=$(uci show network | grep -E "\.device=\'$itf\'" | head -n 1 | cut -d'.' -f2)
# mcast config is outdated, simply generate as per new logic
if [ -z "$dev_section" ]; then