mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
mcastmngr: add filtering rules for downstream
This is necessary to filter IGMP messages from downstream interfaces.
This commit is contained in:
parent
adb318f735
commit
1abf717fc6
1 changed files with 21 additions and 14 deletions
|
|
@ -41,22 +41,29 @@ config_mcproxy_interfaces() {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for upstream in $upstreams; do
|
for excp in $exceptions; do
|
||||||
local filter=""
|
local filter=""
|
||||||
for excp in $exceptions; do
|
|
||||||
case $excp in
|
case $excp in
|
||||||
*/*)
|
*/*)
|
||||||
ip_start="$(ipcalc.sh $excp | grep IP | awk '{print substr($0,4)}')"
|
ip_start="$(ipcalc.sh $excp | grep IP | awk '{print substr($0,4)}')"
|
||||||
ip_end="$(ipcalc.sh $excp | grep BROADCAST | awk '{print substr($0,11)}')"
|
ip_end="$(ipcalc.sh $excp | grep BROADCAST | awk '{print substr($0,11)}')"
|
||||||
filter="$filter ($ip_start - $ip_end | *)"
|
filter="$filter ($ip_start - $ip_end | *)"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
filter="$filter ($excp | *)"
|
filter="$filter ($excp | *)"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
for upstream in $upstreams; do
|
||||||
|
echo "pinstance main upstream \"$upstream\" in blacklist table{$filter };" >> $CONFFILE
|
||||||
|
echo "pinstance main upstream \"$upstream\" out blacklist table{$filter };" >> $CONFFILE
|
||||||
|
done
|
||||||
|
|
||||||
|
for downstream in $downstreams; do
|
||||||
|
echo "pinstance main downstream \"$downstream\" in blacklist table{$filter };" >> $CONFFILE
|
||||||
|
echo "pinstance main downstream \"$downstream\" out blacklist table{$filter };" >> $CONFFILE
|
||||||
done
|
done
|
||||||
echo "pinstance main upstream \"$upstream\" in blacklist table{$filter };" >> $CONFFILE
|
|
||||||
echo "pinstance main upstream \"$upstream\" out blacklist table{$filter };" >> $CONFFILE
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue