diff --git a/cmd_parser.c b/cmd_parser.c index 21ff7a8..6178f9a 100644 --- a/cmd_parser.c +++ b/cmd_parser.c @@ -1525,15 +1525,7 @@ void cmd_parser(void) __banked else igmp_setup(); // Reverts to default with IP-MC being flooded } else if (cmd_compare(0, "stp")) { - if (cmd_compare(1, "on")) { - print_string("STP enabled\n"); - stpEnabled = 1; - stp_setup(); - } else { - print_string("STP disabled\n"); - stp_off(); - stpEnabled = 0; - } + stp_parse(); } else if (cmd_compare(0, "pvid") && cmd_words_len == 3) { __xdata uint16_t pvid; uint8_t port; diff --git a/html/config.js b/html/config.js index 6efa283..e7fb055 100644 --- a/html/config.js +++ b/html/config.js @@ -22,6 +22,14 @@ const conf_cmds = [ /^laghash\s+\d(\s+\w+)+$/, /^isolate\s+\d{1,2}(\s+(off|\d{1,2}))+$/, /^stp\s+(on|off)$/, + /^stp\s+(prio|hello|maxage|fwd|txhold)\s+\d{1,2}$/, + /^stp\s+version\s+(rstp|stp)$/, + /^stp\s+port\s+\d{1,2}\s+(on|off)$/, + /^stp\s+port\s+\d{1,2}\s+edge\s+(on|off|auto)$/, + /^stp\s+port\s+\d{1,2}\s+cost\s+\d{1,3}$/, + /^stp\s+port\s+\d{1,2}\s+prio\s+\d{1,3}$/, + /^stp\s+port\s+\d{1,2}\s+guard\s+(none|bpdu|root)$/, + /^stp\s+port\s+\d{1,2}\s+filter\s+(on|off)$/, /^igmp\s+(on|off)$/, /^mtu\s+\d{1,2}\s+\d+$/, /^bw\s+(in|out)\s+\d{1,2}\s+\S+$/, @@ -45,7 +53,8 @@ const conf_overwrite = [ /^lag\s+\d+\b/, /^laghash\b/, /^isolate\s+\d{1,2}\b/, - /^stp\b/, + /^stp\s+(prio|hello|maxage|fwd|txhold|version)\b/, + /^stp\s+port\s+\d{1,2}\s+(edge|cost|prio|guard|filter)\b/, /^igmp\b/, /^mtu\s+\d{1,2}\b/, /^bw\s+(in|out)\s+\d{1,2}\b/, diff --git a/html/stp.html b/html/stp.html index af968f5..1e5a5c2 100644 --- a/html/stp.html +++ b/html/stp.html @@ -13,7 +13,27 @@
| Priority | Version | Hello [s] | Max age [s] | Fwd delay [s] | Tx hold | +
|---|---|---|---|---|---|
| + | + | + | + | + | + |
Changes apply immediately. Edge ports skip the listen period; guard/filter act on received BPDUs.
+| Port | State | Role | STP | Edge | Cost [k] | Priority | Guard | Filter | +
|---|