mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-02-20 02:44:44 +02:00
[package] base-files-network: configure vlan interface name type immediately before the vconfig add calls, fixes race condition (#11127)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30919 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
5ce4a896b7
commit
a0ced97706
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2007-2011 OpenWrt.org
|
# Copyright (C) 2007-2012 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=base-files-network
|
PKG_NAME:=base-files-network
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=4
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=opkg/host
|
PKG_BUILD_DEPENDS:=opkg/host
|
||||||
|
|
||||||
|
@ -83,6 +83,7 @@ add_vlan() {
|
|||||||
|
|
||||||
[ "$1" = "$vif" ] || ifconfig "$1" >/dev/null 2>/dev/null || {
|
[ "$1" = "$vif" ] || ifconfig "$1" >/dev/null 2>/dev/null || {
|
||||||
ifconfig "$vif" up 2>/dev/null >/dev/null || add_vlan "$vif"
|
ifconfig "$vif" up 2>/dev/null >/dev/null || add_vlan "$vif"
|
||||||
|
$DEBUG vconfig set_name_type DEV_PLUS_VID_NO_PAD
|
||||||
$DEBUG vconfig add "$vif" "${1##*\.}"
|
$DEBUG vconfig add "$vif" "${1##*\.}"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -218,7 +219,8 @@ 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
|
[ -e /sys/devices/virtual/net/br-$config/bridge/multicast_snooping ] && \
|
||||||
|
echo $igmp_snooping > /sys/devices/virtual/net/br-$config/bridge/multicast_snooping
|
||||||
$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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user