From 84d0dadb52b1dfb4ecb01d1416c59da6a8af166c Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 31 Aug 2011 14:51:38 -0400 Subject: Add support for setting random bridge options via BRIDGING_OPTS. (#734045, #665378) --- sysconfig/network-scripts/ifup-eth | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sysconfig') diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index e4c65aa0..de6add11 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -56,6 +56,12 @@ if [ "${TYPE}" = "Bridge" ]; then fi [ -n "${DELAY}" ] && /usr/sbin/brctl setfd ${DEVICE} ${DELAY} [ -n "${STP}" ] && /usr/sbin/brctl stp ${DEVICE} ${STP} + # add the bits to setup driver parameters here + for arg in $BRIDGING_OPTS ; do + key=${arg%%=*}; + value=${arg##*=}; + echo $value > /sys/class/net/${DEVICE}/bridge/$key + done fi # If the device is a tap device, create it with tunctl, if available. @@ -159,6 +165,12 @@ if [ -n "${BRIDGE}" ] && [ -x /usr/sbin/brctl ]; then ethtool_set [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY} /usr/sbin/brctl addif ${BRIDGE} ${DEVICE} + # add the bits to setup driver parameters here + for arg in $BRIDGING_OPTS ; do + key=${arg%%=*}; + value=${arg##*=}; + echo $value > /sys/class/net/${DEVICE}/brport/$key + done # Upon adding a device to a bridge, # it's necessary to make radvd reload its config [ -r /var/run/radvd/radvd.pid ] && kill -HUP $(cat /var/run/radvd/radvd.pid) -- cgit v1.2.1