mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
mcastmngr: enable snooping on linux platforms
enabling snooping in bridges in case of linux platforms
This commit is contained in:
parent
80d7e57441
commit
d930fdd86d
1 changed files with 20 additions and 0 deletions
|
|
@ -67,6 +67,22 @@ config_mcproxy_interfaces() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config_sysfs_mcast_snooping() {
|
||||||
|
local devsec=
|
||||||
|
local sectype=
|
||||||
|
local devtype=
|
||||||
|
local ports=
|
||||||
|
|
||||||
|
for downstream in $downstreams; do
|
||||||
|
devsec="$(uci show network | grep name=.*$downstream | cut -d'.' -f2)"
|
||||||
|
sectype="$(uci -q get network.$devsec)"
|
||||||
|
devtype="$(uci -q get network.$devsec.type)"
|
||||||
|
if [ "$sectype" == "device" -a "$devtype" == "bridge" ]; then
|
||||||
|
echo 1 > /sys/class/net/$downstream/bridge/multicast_snooping
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
config_mcproxy_instance() {
|
config_mcproxy_instance() {
|
||||||
local protocol="$1"
|
local protocol="$1"
|
||||||
local version="$2"
|
local version="$2"
|
||||||
|
|
@ -124,6 +140,10 @@ config_mcproxy_instance() {
|
||||||
downstreams=$mld_p_down_interfaces
|
downstreams=$mld_p_down_interfaces
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# for snooping to work we should enable it on the bridge, doing it from
|
||||||
|
# here instead of from inside network config
|
||||||
|
config_sysfs_mcast_snooping
|
||||||
|
|
||||||
[ -n "$robustness" ] && echo -e "rv $robustness;" >> $CONFFILE
|
[ -n "$robustness" ] && echo -e "rv $robustness;" >> $CONFFILE
|
||||||
[ -n "$query_interval" ] && echo -e "qi $query_interval;" >> $CONFFILE
|
[ -n "$query_interval" ] && echo -e "qi $query_interval;" >> $CONFFILE
|
||||||
[ -n "$q_resp_interval" ] && echo -e "qri $q_resp_interval;" >> $CONFFILE
|
[ -n "$q_resp_interval" ] && echo -e "qri $q_resp_interval;" >> $CONFFILE
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue