From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 27AA11384B4 for ; Sun, 8 Nov 2015 14:30:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C289F21C023; Sun, 8 Nov 2015 14:30:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 14B2821C023 for ; Sun, 8 Nov 2015 14:30:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5CDB333FDBF for ; Sun, 8 Nov 2015 14:30:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 88572228D for ; Sun, 8 Nov 2015 14:30:01 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1446927482.734e527dbe32fc3c0abdd326c485a6e69d8646f2.robbat2@OpenRC> Subject: [gentoo-commits] proj/netifrc:master commit in: net/, doc/ X-VCS-Repository: proj/netifrc X-VCS-Files: doc/net.example.Linux.in net/bridge.sh X-VCS-Directories: doc/ net/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 734e527dbe32fc3c0abdd326c485a6e69d8646f2 X-VCS-Branch: master Date: Sun, 8 Nov 2015 14:30:01 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: ba1dc528-e5ae-4410-bbe1-dcac13876d0d X-Archives-Hash: b17d23fd17e41d72133b5cea443d3d67 commit: 734e527dbe32fc3c0abdd326c485a6e69d8646f2 Author: Alon Bar-Lev gentoo org> AuthorDate: Sat Nov 7 20:02:59 2015 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Sat Nov 7 20:18:02 2015 +0000 URL: https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=734e527d net: bridge: add bridge_ and brport_ prefixes to sysfs interface keep the no prefix to be backward compatible. Signed-off-by: Alon Bar-Lev gentoo.org> doc/net.example.Linux.in | 6 +++--- net/bridge.sh | 29 +++++++++++++++++------------ 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/doc/net.example.Linux.in b/doc/net.example.Linux.in index bcf3311..f71385d 100644 --- a/doc/net.example.Linux.in +++ b/doc/net.example.Linux.in @@ -919,9 +919,9 @@ # You can also configure the bridge or bridge members via sysfs on 2.6 kernels # or newer. See the kernel bridge documentation for a description of these # options. -#stp_state_br0="0" -#forward_delay_br0="10" -#hairpin_mode_eth0="1" +#bridge_stp_state_br0="0" +#bridge_forward_delay_br0="10" +#brport_hairpin_mode_eth0="1" #----------------------------------------------------------------------------- # RFC 2684 Bridge Support diff --git a/net/bridge.sh b/net/bridge.sh index 82abb71..407b578 100644 --- a/net/bridge.sh +++ b/net/bridge.sh @@ -125,12 +125,15 @@ bridge_pre_start() for x in /sys/class/net/"${IFACE}"/bridge/*; do [ -f "${x}" ] || continue n=${x##*/} - eval s=\$${n}_${IFVAR} - if [ -n "${s}" ]; then - einfo "Setting ${n}: ${s}" - echo "${s}" >"${x}" || \ - eerror "Failed to configure $n (${n}_${IFVAR})" - fi + # keep no prefix for backward compatibility + for prefix in "" bridge_; do + eval s=\$${prefix}${n}_${IFVAR} + if [ -n "${s}" ]; then + einfo "Setting ${n}: ${s}" + echo "${s}" >"${x}" || \ + eerror "Failed to configure $n (${n}_${IFVAR})" + fi + done done if [ -n "${ports}" ]; then @@ -161,12 +164,14 @@ bridge_pre_start() for x in /sys/class/net/"${IFACE}"/brport/*; do [ -f "${x}" ] || continue n=${x##*/} - eval s=\$${n}_${IFVAR} - if [ -n "${s}" ]; then - einfo "Setting ${n}@${IFACE}: ${s}" - echo "${s}" >"${x}" || \ - eerror "Failed to configure $n (${n}_${IFVAR})" - fi + for prefix in "" brport_; do + eval s=\$${prefix}${n}_${IFVAR} + if [ -n "${s}" ]; then + einfo "Setting ${n}@${IFACE}: ${s}" + echo "${s}" >"${x}" || \ + eerror "Failed to configure $n (${n}_${IFVAR})" + fi + done done eend 0 done