fix(ospf): сопоставлять IPv6 адреса и исключать неоднозначный BFD

This commit is contained in:
Denozordec committed 2026-10-12 09:48:06 +07:00
1 parent 1b63e3ec43
commit e1617f1472
11 files changed
+201 -19

No files matched your search

+5 -3
View File
@@ -1,12 +1,13 @@
import { test, expect } from "@playwright/test"
for (const width of [1440, 320]) {
test(`OSPF Full/BFD Down: предупреждение, scope и recovery, ширина ${width}`, async ({ page }) => {
for (const ipv6 of [false, true]) {
test(`OSPF Full/BFD Down: предупреждение, scope и recovery, IPv${ipv6 ? 6 : 4}, ширина ${width}`, async ({ page }) => {
await page.setViewportSize({ width, height: 1000 })
let phase = "down"
const base = { serverId: 1, serverName: "CHR 1", serverSite: "", serverCountry: "RU" }
const neighbor = { ...base, id: "*n", address: "198.18.153.2", routerId: "198.18.253.2", instance: "own", area: "own", areaId: "0.0.0.0", interface: "gre-own", state: "Full", uptime: "1m", stateChanges: 1, priority: 1 }
const neighbor = { ...base, id: "*n", address: ipv6 ? "FE80:0000:0000:0000:0000:0000:0000:0002%gre-own" : "198.18.153.2", routerId: "198.18.253.2", instance: "own", area: "own", areaId: "0.0.0.0", interface: "gre-own", state: "Full", uptime: "1m", stateChanges: 1, priority: 1 }
const iface = { ...base, id: "*i", instance: "own", area: "own", areaId: "0.0.0.0", interface: "gre-own", cost: 10, type: "ptp", disabled: false, inactive: false, priority: 1, helloInterval: 1, deadInterval: 20, useBfd: true }
const bfd = { ...base, id: "*b", localAddr: "198.18.153.1", remoteAddr: "198.18.153.2", interface: "gre-own", state: "Down", uptime: "1s", multihop: false, multiplier: 3, txInterval: 200, rxInterval: 200, holdTime: null, packetsRx: 10, packetsTx: 20, stateChanges: 1 }
const bfd = { ...base, id: "*b", localAddr: ipv6 ? "fe80::1" : "198.18.153.1", remoteAddr: ipv6 ? "fe80::2" : "198.18.153.2", interface: "gre-own", state: "Down", uptime: "1s", multihop: false, multiplier: 3, txInterval: 200, rxInterval: 200, holdTime: null, packetsRx: 10, packetsTx: 20, stateChanges: 1 }
const errors: string[] = []
page.on("pageerror", e => errors.push(e.message))
await page.route("**/health", route => route.fulfill({ json: { ok: true } }))
@@ -34,4 +35,5 @@ for (const width of [1440, 320]) {
}
expect(errors).toEqual([])
})
}
}