mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
[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
This commit is contained in:
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=base-files
|
PKG_NAME:=base-files
|
||||||
PKG_RELEASE:=81
|
PKG_RELEASE:=82
|
||||||
|
|
||||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||||
PKG_BUILD_DEPENDS:=opkg/host
|
PKG_BUILD_DEPENDS:=opkg/host
|
||||||
|
|||||||
@@ -204,8 +204,9 @@ prepare_interface() {
|
|||||||
$DEBUG brctl addif "br-$config" "$iface"
|
$DEBUG brctl addif "br-$config" "$iface"
|
||||||
# Bridge existed already. No further processing necesary
|
# Bridge existed already. No further processing necesary
|
||||||
} || {
|
} || {
|
||||||
local stp
|
local stp igmp_snooping
|
||||||
config_get_bool stp "$config" stp 0
|
config_get_bool stp "$config" stp 0
|
||||||
|
config_get_bool igmp_snooping "$config" igmp_snooping 1
|
||||||
$DEBUG brctl addbr "br-$config"
|
$DEBUG brctl addbr "br-$config"
|
||||||
$DEBUG brctl setfd "br-$config" 0
|
$DEBUG brctl setfd "br-$config" 0
|
||||||
$DEBUG ifconfig "$iface" 0.0.0.0
|
$DEBUG ifconfig "$iface" 0.0.0.0
|
||||||
@@ -213,6 +214,7 @@ prepare_interface() {
|
|||||||
$DEBUG brctl addif "br-$config" "$iface"
|
$DEBUG brctl addif "br-$config" "$iface"
|
||||||
$DEBUG brctl stp "br-$config" $stp
|
$DEBUG brctl stp "br-$config" $stp
|
||||||
[ -z "$macaddr" ] && macaddr="$(cat /sys/class/net/$iface/address)"
|
[ -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
|
$DEBUG ifconfig "br-$config" hw ether $macaddr up
|
||||||
# Creating the bridge here will have triggered a hotplug event, which will
|
# Creating the bridge here will have triggered a hotplug event, which will
|
||||||
# result in another setup_interface() call, so we simply stop processing
|
# result in another setup_interface() call, so we simply stop processing
|
||||||
|
|||||||
Reference in New Issue
Block a user