summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-10-11 13:43:08 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-10-11 13:43:08 +0000
commit59c13202e0923f5365caac1f4d2d4baefad731f6 (patch)
treeec0b806c148d7ea0dc047419d9936b996b6555d3 /package
parent261389b709cb26f4eac6981d0a44ce77de284f2d (diff)
downloadmtk-20170518-59c13202e0923f5365caac1f4d2d4baefad731f6.zip
mtk-20170518-59c13202e0923f5365caac1f4d2d4baefad731f6.tar.gz
mtk-20170518-59c13202e0923f5365caac1f4d2d4baefad731f6.tar.bz2
base-files: introduce "igmp_snooping" option to toggle IGMP snooping on bridge interfaces
SVN-Revision: 28412
Diffstat (limited to 'package')
-rw-r--r--package/base-files/Makefile2
-rwxr-xr-xpackage/base-files/files/lib/network/config.sh4
2 files changed, 4 insertions, 2 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 713dd7f..6d494e0 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -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
diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh
index ce8ec89..29d021a 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