diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-10-11 13:43:08 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-10-11 13:43:08 +0000 |
commit | 1b26bdeb31db0e7abdb67a97f776772b0b8e63bc (patch) | |
tree | 08180c8acadffe3ba0754f9330f6922927fef1e2 /package/base-files/files/lib | |
parent | d504175233010ec8b3431ca3f18c7d3760ee4993 (diff) | |
download | master-187ad058-1b26bdeb31db0e7abdb67a97f776772b0b8e63bc.tar.gz master-187ad058-1b26bdeb31db0e7abdb67a97f776772b0b8e63bc.tar.bz2 master-187ad058-1b26bdeb31db0e7abdb67a97f776772b0b8e63bc.zip |
[package] base-files: introduce "igmp_snooping" option to toggle IGMP snooping on bridge interfaces
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28412 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files/lib')
-rwxr-xr-x | package/base-files/files/lib/network/config.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh index ce8ec89eae..29d021af92 100755 --- a/package/base-files/files/lib/network/config.sh +++ b/package/base-files/files/lib/network/config.sh @@ -204,8 +204,9 @@ prepare_interface() { $DEBUG brctl addif "br-$config" "$iface" # Bridge existed already. No further processing necesary } || { - local stp + local stp igmp_snooping config_get_bool stp "$config" stp 0 + config_get_bool igmp_snooping "$config" igmp_snooping 1 $DEBUG brctl addbr "br-$config" $DEBUG brctl setfd "br-$config" 0 $DEBUG ifconfig "$iface" 0.0.0.0 @@ -213,6 +214,7 @@ prepare_interface() { $DEBUG brctl addif "br-$config" "$iface" $DEBUG brctl stp "br-$config" $stp [ -z "$macaddr" ] && macaddr="$(cat /sys/class/net/$iface/address)" + echo $igmp_snooping > /sys/devices/virtual/net/br-$config/bridge/multicast_snooping 2>/dev/null $DEBUG ifconfig "br-$config" hw ether $macaddr up # Creating the bridge here will have triggered a hotplug event, which will # result in another setup_interface() call, so we simply stop processing |