From 3ce61adcc002c45c4f6e6bc2ae8057133a9561bb Mon Sep 17 00:00:00 2001 From: casparsmit Date: Tue, 12 Apr 2016 14:19:30 +0200 Subject: [PATCH 1/5] Add common spanning tree tunables for bridges --- net/edit_bifc.cgi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/edit_bifc.cgi b/net/edit_bifc.cgi index cd4a598ef..0d3419e9b 100755 --- a/net/edit_bifc.cgi +++ b/net/edit_bifc.cgi @@ -300,6 +300,12 @@ if ($in{'bridge'} || $b && $b->{'bridge'}) { [ [ "", $text{'bifc_nobridge'} ], @ethboot ], 1, 0, $in{'new'} ? 0 : 1)); + print &ui_table_row($text{'bifc_bridgestp'}, + &ui_radio("bridgestp", $b->{'bridgestp'} ? $b->{'bridgestp'} : "off", [["off", "Off"], ["on", "On"]])); + print &ui_table_row($text{'bifc_bridgefd'}, + &ui_textbox("bridgefd", $b->{'bridgefd'} ? $b->{'bridgefd'} : "0", 3)." seconds"); + print &ui_table_row($text{'bifc_bridgewait'}, + &ui_textbox("bridgewait", $b->{'bridgewait'} ? $b->{'bridgewait'} : "0", 3)." seconds"); } print &ui_table_end(); From f8982ddf4fc7f9dae58e79db1e6ef6cdcea4b23c Mon Sep 17 00:00:00 2001 From: casparsmit Date: Tue, 12 Apr 2016 14:25:03 +0200 Subject: [PATCH 2/5] Add common spanning tree tunables for bridges --- net/save_bifc.cgi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/save_bifc.cgi b/net/save_bifc.cgi index b83f99373..58dcee61f 100755 --- a/net/save_bifc.cgi +++ b/net/save_bifc.cgi @@ -311,6 +311,9 @@ else { ($bt->{'address'} || $bt->{'dhcp'} || $bt->{'bootp'}) && &error($text{'bifc_ebridgeto2'}); $b->{'bridgeto'} = $in{'bridgeto'}; + $b->{'bridgestp'} = $in{'bridgestp'}; + $b->{'bridgefd'} = $in{'bridgefd'}; + $b->{'bridgewait'} = $in{'bridgewait'}; } # Save the interface with its final name From 1e95673391fccb95a65f5907936687518eb8f2ad Mon Sep 17 00:00:00 2001 From: casparsmit Date: Tue, 12 Apr 2016 14:31:40 +0200 Subject: [PATCH 3/5] Add common spanning tree tunables for bridges --- net/debian-linux-lib.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/net/debian-linux-lib.pl b/net/debian-linux-lib.pl index 72a32862e..ab0949911 100755 --- a/net/debian-linux-lib.pl +++ b/net/debian-linux-lib.pl @@ -76,6 +76,15 @@ foreach $iface (@ifaces) { elsif ($param eq 'bridge_ports') { $cfg->{'bridgeto'} = $value; } + elsif ($param eq 'bridge_stp') { + $cfg->{'bridgestp'} = $value; + } + elsif ($param eq 'bridge_fd') { + $cfg->{'bridgefd'} = $value; + } + elsif ($param eq 'bridge_waitport') { + $cfg->{'bridgewait'} = $value; + } elsif ($param eq 'pre-up' && $value =~ /brctl\s+addif\s+br\d+\s+(\S+)/) { $cfg->{'bridgeto'} = $1; From 07772b29f62ffe14c539964cc70e8313cbe98287 Mon Sep 17 00:00:00 2001 From: casparsmit Date: Tue, 12 Apr 2016 14:33:28 +0200 Subject: [PATCH 4/5] Add common spanning tree tunables for bridges --- net/debian-linux-lib.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/debian-linux-lib.pl b/net/debian-linux-lib.pl index ab0949911..522e7066c 100755 --- a/net/debian-linux-lib.pl +++ b/net/debian-linux-lib.pl @@ -219,6 +219,9 @@ if ($cfg->{'bridge'}) { else { push(@options, [ 'pre-up', 'brctl addbr '.$name ]); } + push(@options, [ 'bridge_stp', $cfg->{'bridgestp'} ]); + push(@options, [ 'bridge_fd', $cfg->{'bridgefd'} ]); + push(@options, [ 'bridge_waitport', $cfg->{'bridgewait'} ]); } # Set bonding parameters From 4bb2ebb84e1c757577af2dbd46a85f2ba261827a Mon Sep 17 00:00:00 2001 From: casparsmit Date: Tue, 12 Apr 2016 14:35:36 +0200 Subject: [PATCH 5/5] Add common spanning tree tunables for bridges --- net/lang/en | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/lang/en b/net/lang/en index b3bee4683..4c499c175 100644 --- a/net/lang/en +++ b/net/lang/en @@ -109,6 +109,9 @@ bifc_nobridge=<None> bifc_ebridgeto=An existing Ethernet interface must be selected for this bridge to use bifc_ebridgeto2=The selected interface for the bridge must not have any address assigned bifc_ebridge=Bridge interface must be a number +bifc_bridgestp=Spanning Tree Protocol +bifc_bridgefd=Forward Delay +bifc_bridgewait=Delay to become available bifc_ebond=Bond interface must be a number bonding_add=Add a new bonding Interface.