mirror of
https://github.com/hansjone/netx.git
synced 2026-10-19 20:40:49 +08:00
Fix VPNv6 wrap parsing and expand global BGP peer-group members.
Join IPv6 summary/route continuations; reject false FSM hits. For non-VRF AF activates, expand peer-group to member Neighbor IPs (VRF stays direct-only). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
e89427297d
commit
0aa2bcbbe6
7 changed files with 295 additions and 62 deletions
|
|
@ -17,7 +17,11 @@ _PEER_LINE_RE = re.compile(
|
|||
r"(?P<rx>\d+)\s+(?P<tx>\d+)\s+(?P<up>\S+)\s+(?P<state>\S+)\s*$",
|
||||
re.I,
|
||||
)
|
||||
_NEI_ONLY_RE = re.compile(r"^(?P<nei>[0-9A-Fa-f:]+)\s*$", re.I)
|
||||
# Wrapped neighbor may be IPv4 or IPv6 on its own line
|
||||
_NEI_ONLY_RE = re.compile(
|
||||
r"^(?P<nei>\d{1,3}(?:\.\d{1,3}){3}|[0-9A-Fa-f:]+)\s*$",
|
||||
re.I,
|
||||
)
|
||||
_CONT_RE = re.compile(
|
||||
r"^\s+(?P<ver>\d+)\s+(?P<asn>\S+)\s+"
|
||||
r"(?P<rx>\d+)\s+(?P<tx>\d+)\s+(?P<up>\S+)\s+(?P<state>\S+)\s*$",
|
||||
|
|
@ -107,6 +111,12 @@ def _map_fsm_rows(
|
|||
pending = ""
|
||||
if not nei or not ver:
|
||||
continue
|
||||
if "#" in nei or not re.match(
|
||||
r"^(?:\d{1,3}(?:\.\d{1,3}){3}|[0-9A-Fa-f]*:[0-9A-Fa-f:]+)$",
|
||||
nei,
|
||||
re.I,
|
||||
):
|
||||
continue
|
||||
if nei in seen:
|
||||
continue
|
||||
seen.add(nei)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue