diff options
author | Bill Nottingham <notting@redhat.com> | 2011-08-31 14:51:38 -0400 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2011-08-31 14:51:38 -0400 |
commit | 84d0dadb52b1dfb4ecb01d1416c59da6a8af166c (patch) | |
tree | 8de5544de4f2c1b4fa657d1854dcff714e88e7c2 | |
parent | 96f8614c974e11eb05706f2cbecbe4ba41420691 (diff) | |
download | initscripts-84d0dadb52b1dfb4ecb01d1416c59da6a8af166c.tar initscripts-84d0dadb52b1dfb4ecb01d1416c59da6a8af166c.tar.gz initscripts-84d0dadb52b1dfb4ecb01d1416c59da6a8af166c.tar.bz2 initscripts-84d0dadb52b1dfb4ecb01d1416c59da6a8af166c.tar.xz initscripts-84d0dadb52b1dfb4ecb01d1416c59da6a8af166c.zip |
Add support for setting random bridge options via BRIDGING_OPTS. (#734045, #665378)
-rw-r--r-- | sysconfig.txt | 8 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-eth | 12 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sysconfig.txt b/sysconfig.txt index 6a3c3b57..002c3be8 100644 --- a/sysconfig.txt +++ b/sysconfig.txt @@ -958,6 +958,14 @@ Files in /etc/sysconfig/network-scripts/ TYPE=Bridge STP=off|on (see 'brctl stp') DELAY=forward delay time in seconds (see 'brctl setfd') + BRIDGING_OPTS= + A space-separated list of bridging options for either the bridge + device, or the port device, such as: + + BRIDGING_OPTS="hello_time=200 priority=65535" + for bridge devices, or + BRIDGING_OPTS="hairpin_mode=1" + for port devices. TUN/TAP-specific items: OWNER=<owner of the device> 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) |