mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
mcastmngr: updates
- Default filter value updated as per requirements. - Logic added to modify filter ip address as accepted in /var/mcpd.conf in broadcom.sh Noticed one hard coding in qos, fixed that too.
This commit is contained in:
parent
3c79856802
commit
36e9c3a3d7
3 changed files with 35 additions and 5 deletions
|
|
@ -42,7 +42,7 @@ generate_mcast_config(){
|
|||
uci add_list mcast.@proxy[-1].upstream_interface="$itf"
|
||||
done
|
||||
|
||||
uci add_list mcast.@proxy[-1].filter="239.255.255.250"
|
||||
uci add_list mcast.@proxy[-1].filter="239.0.0.0/8"
|
||||
uci commit mcast
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ config_mcast_proxy_interface() {
|
|||
configure_mcpd_snooping() {
|
||||
local protocol="$1"
|
||||
local exceptions
|
||||
|
||||
local filter_ip=""
|
||||
|
||||
# Configure snooping related params
|
||||
if [ "$protocol" == "igmp" ]; then
|
||||
|
|
@ -261,7 +261,22 @@ configure_mcpd_snooping() {
|
|||
fi
|
||||
|
||||
echo "${protocol}-proxy-enable 0" >> $CONFFILE
|
||||
[ -n "$exceptions" ] && echo "${protocol}-mcast-snoop-exceptions $exceptions" >> $CONFFILE
|
||||
if [ -n "$exceptions" ]; then
|
||||
IFS=" "
|
||||
for excp in $exceptions; do
|
||||
case $excp in
|
||||
*/*)
|
||||
tmp="$(ipcalc.sh $excp | grep IP | awk '{print substr($0,4)}')"
|
||||
tmp1="$(ipcalc.sh $excp | grep NETMASK | awk '{print substr($0,9)}')"
|
||||
filter_ip="$filter_ip $tmp/$tmp1"
|
||||
;;
|
||||
*)
|
||||
filter_ip="$filter_ip $excp"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
echo "${protocol}-mcast-snoop-exceptions $filter_ip" >> $CONFFILE
|
||||
fi
|
||||
}
|
||||
|
||||
configure_mcpd_proxy() {
|
||||
|
|
@ -291,7 +306,22 @@ configure_mcpd_proxy() {
|
|||
echo "${protocol}-proxy-enable 1" >> $CONFFILE
|
||||
echo "${protocol}-fast-leave $fast_leave" >> $CONFFILE
|
||||
|
||||
[ -n "$exceptions" ] && echo "$protocol-mcast-snoop-exceptions $exceptions" >> $CONFFILE
|
||||
if [ -n "$exceptions" ]; then
|
||||
IFS=" "
|
||||
for excp in $exceptions; do
|
||||
case $excp in
|
||||
*/*)
|
||||
tmp="$(ipcalc.sh $excp | grep IP | awk '{print substr($0,4)}')"
|
||||
tmp1="$(ipcalc.sh $excp | grep NETMASK | awk '{print substr($0,9)}')"
|
||||
filter_ip="$filter_ip $tmp/$tmp1"
|
||||
;;
|
||||
*)
|
||||
filter_ip="$filter_ip $excp"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
echo "${protocol}-mcast-snoop-exceptions $filter_ip" >> $CONFFILE
|
||||
fi
|
||||
}
|
||||
|
||||
disable_snooping() {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ handle_queue() {
|
|||
esac
|
||||
|
||||
# Call tmctl which is a broadcomm command to configure queues on a port.
|
||||
tmctl setqcfg --devtype 0 --if $ifname --qid $order --priority $order --qsize 1024 --weight $wgt --schedmode $salg --shapingrate $rate --burstsize $bs
|
||||
tmctl setqcfg --devtype 0 --if $ifname --qid $order --priority $order --qsize $qsize --weight $wgt --schedmode $salg --shapingrate $rate --burstsize $bs
|
||||
}
|
||||
|
||||
#function to handle a shaper section
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue