()
| 8087 | } finally { |
| 8088 | _ndBusy(btn, false); |
| 8089 | } |
| 8090 | } |
| 8091 | async function vtpTrustBaseline() { |
| 8092 | try { |
| 8093 | await postAPI('/api/net/vtp-baseline', { action: 'reset' }); |
| 8094 | addConsoleMessage('VTP baseline reset — re-learning current domain / revision / server', 'info'); |
| 8095 | await runVtpWatch(); |
| 8096 | } catch (e) { |
| 8097 | addConsoleMessage('Failed to reset VTP baseline: ' + e.message, 'error'); |
| 8098 | } |
| 8099 | } |
| 8100 | |
| 8101 | // ---- IS-IS Watch (passive IGP routing-security scanner) -------------------- |
| 8102 | const _ISIS_VERDICT_STYLE = { |
| 8103 | clean: ['bg-green-950/40 border-green-900 text-green-400', '✓ No IS-IS anomalies detected'], |
| 8104 | 'weak-auth': ['bg-amber-950/50 border-amber-800 text-amber-300', '⚠ IS-IS without HMAC auth (or cleartext) — exposed to LSP injection'], |
| 8105 | anomaly: ['bg-amber-950/50 border-amber-800 text-amber-300', '⚠ IS-IS anomaly — duplicate system-id / new area'], |
| 8106 | storm: ['bg-red-950/60 border-red-800 text-red-300', '🛑 IS-IS flooding storm detected'], |
| 8107 | 'rogue-router': ['bg-red-950/60 border-red-800 text-red-300', '🛑 Rogue IS-IS speaker — adjacency spoofing'], |
| 8108 | injection: ['bg-red-950/60 border-red-800 text-red-300', '🛑 IS-IS LSP / prefix injection detected'], |
| 8109 | unknown: ['bg-slate-800 border-slate-700 text-slate-400', '— Could not determine'], |
| 8110 | }; |
| 8111 | function _isisFillIfaces() { |
| 8112 | const sel = document.getElementById('isis-iface'); |
| 8113 | if (!sel || sel.dataset.filled === '1') return Promise.resolve(); |
| 8114 | return fetchAPI('/api/net/interfaces').then(x => { |
| 8115 | (x.interfaces || []).forEach(i => { |
| 8116 | const o = document.createElement('option'); |
| 8117 | o.value = i.name; |
| 8118 | const tag = i.type === 'wifi' ? ' (WiFi)' : i.type === 'ethernet' ? ' (LAN)' : (i.type ? ' (' + i.type + ')' : ''); |
| 8119 | o.textContent = i.name + tag; |
| 8120 | sel.appendChild(o); |
| 8121 | }); |
| 8122 | sel.dataset.filled = '1'; |
nothing calls this directly
no test coverage detected