diff options
author | Rémy Oudompheng <remy@archlinux.org> | 2011-06-13 13:12:00 +0200 |
---|---|---|
committer | Rémy Oudompheng <remy@archlinux.org> | 2011-06-13 13:13:59 +0200 |
commit | b4cbac83ffd487d37ba47b3238abe693f86cdd50 (patch) | |
tree | 6fcfe8f81112f75328f4adc9cf1937355a085b44 | |
parent | 1f5183b895aa50a2761fd4d996e15a29f85455fc (diff) | |
download | netctl-b4cbac83ffd487d37ba47b3238abe693f86cdd50.tar.gz netctl-b4cbac83ffd487d37ba47b3238abe693f86cdd50.tar.xz |
bridge: add FWD_DELAY and MAX_AGE options (FS#16625)
Bridge support is quite rudimentary and should support
common options.
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
-rw-r--r-- | examples/bridge | 4 | ||||
-rw-r--r-- | src/connections/bridge | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/examples/bridge b/examples/bridge index 98154b8..bd422fa 100644 --- a/examples/bridge +++ b/examples/bridge @@ -3,3 +3,7 @@ CONNECTION="bridge" DESCRIPTION="Example Bridge connection" BRIDGE_INTERFACES="eth0 eth1 tap0" IP="dhcp" +## sets forward delay time +#FWD_DELAY=0 +## sets max age of hello message +#MAX_AGE=10 diff --git a/src/connections/bridge b/src/connections/bridge index 0e44f40..3cf60c1 100644 --- a/src/connections/bridge +++ b/src/connections/bridge @@ -20,6 +20,13 @@ bridge_up() { ip addr flush dev $bridge_client $BRCTL addif $INTERFACE $bridge_client done + # Set options + if [ -n "$FWD_DELAY" ]; then + $BRCTL setfd $INTERFACE "$FWD_DELAY" + fi + if [ -n "$MAX_AGE" ]; then + $BRCTL setmaxage $INTERFACE "$MAX_AGE" + fi bring_interface up "$INTERFACE" "$CONN_DIR/ethernet" up "$1" |