[package] base-files: introduce "igmp_snooping" option to toggle IGMP snooping on...
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 11 Oct 2011 13:43:08 +0000 (13:43 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 11 Oct 2011 13:43:08 +0000 (13:43 +0000)
SVN-Revision: 28412

package/base-files/Makefile
package/base-files/files/lib/network/config.sh

index 713dd7fad540606f25b6e1aa57b0ad9b8e8239dc..6d494e06ddfd12e9befc2583beac97259ca2f7bc 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=81
+PKG_RELEASE:=82
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 PKG_BUILD_DEPENDS:=opkg/host
index ce8ec89eae213dea980f38d2c31d31d3fb2b6774..29d021af92c1ce92a5a891ec421ac25e0bfbd001 100755 (executable)
@@ -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