1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-04 23:53:08 +02:00

[package]

- fix mac assignment for broadcom vifs in bridging mode - thanks abramoff1 for spotting this
	- fix possible regression with different interface protocols
	- bump PKG_RELEASE


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15042 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2009-03-25 19:13:15 +00:00
parent fe9634bd96
commit bc175c58b0
3 changed files with 12 additions and 4 deletions

View File

@ -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:=16 PKG_RELEASE:=17
PKG_FILE_DEPEND:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ PKG_FILE_DEPEND:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/

View File

@ -83,6 +83,7 @@ sort_list() {
prepare_interface() { prepare_interface() {
local iface="$1" local iface="$1"
local config="$2" local config="$2"
local vifmac="$3"
# if we're called for the bridge interface itself, don't bother trying # if we're called for the bridge interface itself, don't bother trying
# to create any interfaces here. The scripts have already done that, otherwise # to create any interfaces here. The scripts have already done that, otherwise
@ -93,6 +94,12 @@ prepare_interface() {
# make sure the interface is removed from any existing bridge and deconfigured # make sure the interface is removed from any existing bridge and deconfigured
ifconfig "$iface" 0.0.0.0 ifconfig "$iface" 0.0.0.0
unbridge "$iface" unbridge "$iface"
# Change interface MAC address if requested
[ -n "$vifmac" ] && {
ifconfig "$iface" down
ifconfig "$iface" hw ether "$vifmac" up
}
} }
# Setup VLAN interfaces # Setup VLAN interfaces
@ -209,6 +216,7 @@ setup_interface_alias() {
setup_interface() { setup_interface() {
local iface="$1" local iface="$1"
local config="$2" local config="$2"
local vifmac="$4"
local proto local proto
local macaddr local macaddr
@ -218,7 +226,7 @@ setup_interface() {
} }
proto="${3:-$(config_get "$config" proto)}" proto="${3:-$(config_get "$config" proto)}"
prepare_interface "$iface" "$config" || return 0 prepare_interface "$iface" "$config" "$vifmac" || return 0
[ "$iface" = "br-$config" ] && { [ "$iface" = "br-$config" ] && {
# need to bring up the bridge and wait a second for # need to bring up the bridge and wait a second for
@ -231,7 +239,6 @@ setup_interface() {
# Interface settings # Interface settings
config_get mtu "$config" mtu config_get mtu "$config" mtu
config_get macaddr "$config" macaddr config_get macaddr "$config" macaddr
macaddr="${macaddr:-$3}"
grep "$iface:" /proc/net/dev > /dev/null && \ grep "$iface:" /proc/net/dev > /dev/null && \
$DEBUG ifconfig "$iface" down && \ $DEBUG ifconfig "$iface" down && \
$DEBUG ifconfig "$iface" ${macaddr:+hw ether "$macaddr"} ${mtu:+mtu $mtu} up $DEBUG ifconfig "$iface" ${macaddr:+hw ether "$macaddr"} ${mtu:+mtu $mtu} up

View File

@ -66,11 +66,12 @@ wifi_detect() {
start_net() {( start_net() {(
local iface="$1" local iface="$1"
local config="$2" local config="$2"
local vifmac="$3"
[ -f "/var/run/$iface.pid" ] && kill "$(cat /var/run/${iface}.pid)" 2>/dev/null [ -f "/var/run/$iface.pid" ] && kill "$(cat /var/run/${iface}.pid)" 2>/dev/null
include /lib/network include /lib/network
scan_interfaces scan_interfaces
setup_interface "$1" "$2" "$3" setup_interface "$iface" "$config" "" "$vifmac"
)} )}
set_wifi_up() { set_wifi_up() {