mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-09-02 15:02:51 +08:00
The window could be armed from the serial console but only ever disarmed by an HTTP request. save_cmd, which gates arming, is cleared only while execute_config() replays the startup config, so every interactive command armed it wherever it was typed, while mgmt_alive, which disarms it, was written in exactly one place, on HTTP traffic. An operator working entirely on the serial console therefore lost STP 180 seconds after enabling it however much they typed, which is what makes the mechanism impossible to test from a console. The documentation described the behaviour that was intended rather than the one that was built, and in both directions: it said a command on the serial console also confirms, and it said a reboot with STP in the startup config disables it again three minutes later. Neither held. The replay path never armed the window at all. Repairing the asymmetry would have kept a mechanism whose premise is contested anyway. A watchdog that switches the protection off in response to silence adds a second failure mode on top of the first: where the network is misconfigured and STP is the thing holding a storm back, restoring forwarding removes the last reason management still answers. Gone with it: the stp failsafe command, the fs and fsT fields of /stp.json, the input and the tripped banner on the Spanning Tree page, the two persistence patterns in config.js, the documentation section, and mgmt_alive itself, which had no other reader. 550 bytes back, 145 of BANK1 and 405 of BANK2, and five of xdata, which is the four counters and mgmt_alive and nothing else. Built for SWTGW218AS and KP_9000_6XHML_X2 on sdcc 4.5.0.
48 lines
2.2 KiB
HTML
48 lines
2.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<script src="/main.js"></script>
|
|
<script src="/i18n.js"></script>
|
|
<link rel="stylesheet" href="style.css">
|
|
<title>FreeSwitchOS Spanning Tree</title>
|
|
</head>
|
|
<body>
|
|
<nav id="sidebar"></nav>
|
|
<div style="margin-left:16%;padding:1px 16px;height:1000px;">
|
|
<div id="ports"></div>
|
|
<h1>Spanning Tree (RSTP)</h1>
|
|
<h2>Mode: <select id="stpMode"><option value="off">Disabled</option><option value="on">Enabled</option></select>
|
|
<input style="width:15%;margin-left: 3em;" class="action" id="stp_sub" onclick="stpSub();" type="button" value="Apply"></h2>
|
|
<div id="stpStat" style="font-family:monospace;"></div>
|
|
<h2>Bridge settings</h2>
|
|
<table id="stpBridge">
|
|
<tr>
|
|
<th>Priority</th><th>Version</th><th>Hello [s]</th><th>Max age [s]</th><th>Fwd delay [s]</th><th>Tx hold</th>
|
|
</tr>
|
|
<tr>
|
|
<td><select id="bPrio"></select></td>
|
|
<td><select id="bVer"><option value="rstp">RSTP</option><option value="stp">STP compat</option></select></td>
|
|
<td><input id="bHello" type="number" min="1" max="10" style="width:4em"></td>
|
|
<td><input id="bMaxage" type="number" min="6" max="40" style="width:4em"></td>
|
|
<td><input id="bFwd" type="number" min="4" max="30" style="width:4em"></td>
|
|
<td><input id="bTxhold" type="number" min="1" max="10" style="width:4em"></td>
|
|
</tr>
|
|
</table>
|
|
<p style="font-size:small">Changes apply immediately. Edge ports skip the listen period; guard/filter act on received BPDUs.</p>
|
|
<h2>Port configuration</h2>
|
|
<table id="stpPortsTbl">
|
|
<tr>
|
|
<th>Port</th><th>State</th><th>Path Cost<br><span style="font-weight:normal;font-size:small">(0 = Auto)</span></th><th>Priority</th><th>Edge Port</th><th>BPDU Filter</th><th>Guard</th><th>Point-to-Point</th>
|
|
</tr>
|
|
</table>
|
|
<h2>Port status</h2>
|
|
<table id="stpStatTbl">
|
|
<tr>
|
|
<th>Port</th><th>Port State</th><th>Role</th><th>Designated Bridge</th><th>Designated Port ID</th><th>Designated Cost</th><th>Oper. Edge</th><th>Oper. P2P</th>
|
|
</tr>
|
|
</table>
|
|
<script src="/stp.js"></script>
|
|
</div>
|
|
</body>
|
|
<script src="/navigation.js"></script>
|
|
</html>
|