mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 03:10:46 +08:00
Match BGP discover afi exactly so ipv4 does not hit vpnv4.
Apply the same global peer-group member expand to address-family ipv4; keep VRF direct-only. Cover IPv4 wrapped neighbor routes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
0aa2bcbbe6
commit
6b35add5a4
3 changed files with 38 additions and 2 deletions
|
|
@ -137,7 +137,12 @@ def _record_passes_discover_filter(rec: dict[str, Any], ph: PlaceholderDef) -> b
|
|||
filt_contains = str(ph.discover_filter_contains or "").strip().lower()
|
||||
if filt_field and filt_contains:
|
||||
hay = str(rec.get(filt_field) or "").strip().lower()
|
||||
if filt_contains not in hay:
|
||||
# ``afi`` must be exact (``ipv4`` must not match ``vpnv4``).
|
||||
# CSV fields like ``address_families`` still use substring/token contains.
|
||||
if filt_field == "afi":
|
||||
if hay != filt_contains:
|
||||
return False
|
||||
elif filt_contains not in hay:
|
||||
return False
|
||||
require = str(ph.discover_require_nonempty or "").strip()
|
||||
if require and not str(rec.get(require) or "").strip():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue