Skip to content

Commit 44cc277

Browse files
committed
test(mikrotik): anonymize edge/source IPs in BGP + FRR fixtures
Replace real edge pref-src/gateway addresses (102.x, AS328964) in the MikroTik BGP route fixture and an FRR parser comment with RFC 5737 documentation ranges. IXP/destination addresses are left as-is.
1 parent 8e8ada9 commit 44cc277

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

hyperglass/plugins/_builtin/trace_route_frr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def parse_text(cls, text: str, target: str, source: str) -> TracerouteResult:
8686
_log.debug(f"Split into {len(lines)} lines")
8787

8888
# Patterns for different line formats
89-
# Pattern for regular hop: " 1 102.216.76.37 0.221 ms"
89+
# Pattern for regular hop: " 1 203.0.113.1 0.221 ms"
9090
simple_pattern = re.compile(r"^\s*(\d+)\s+([\d\.:a-fA-F]+)\s+([\d.]+)\s+ms")
9191

9292
# Pattern for timeout hop: " 9 *"

hyperglass/plugins/tests/test_bgp_route_mikrotik.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
SAMPLE = """Flags: X - disabled, F - filtered, U - unreachable, A - active;
2626
c - connect, s - static, r - rip, b - bgp, n - bgp-net, o - ospf, i - isis, d - dhcp, v - vpn, m - modem, a - ldp-address, l - ldp-mapping, g - slaac, y - bgp-mpls-vpn, e - evpn;
2727
H - hw-offloaded; + - ecmp, B - blackhole
28-
Ab afi=ip contribution=active dst-address=1.0.0.0/24 routing-table=main pref-src=102.217.253.3 gateway=196.60.8.198
28+
Ab afi=ip contribution=active dst-address=1.0.0.0/24 routing-table=main pref-src=192.0.2.1 gateway=196.60.8.198
2929
immediate-gw=196.60.8.198%[sfp28-01] distance=20 scope=40 target-scope=10 belongs-to="bgp-IP-196.60.8.198"
3030
rpki=valid bgp.session=NAP-JHB-CloudFlare-v4-1 .as-path="13335" .communities=13335:10045 .large-communities=328964:2000:0,328964:2001:0 .local-pref=250 .med=0 .origin=igp
3131
32-
Fb afi=ip contribution=filtered dst-address=5.101.88.0/24 routing-table=main pref-src=102.217.253.3 gateway=102.130.66.77
33-
immediate-gw=102.130.66.77%[sfp28-10] distance=20 scope=40 target-scope=10 belongs-to="bgp-IP-102.130.66.77"
32+
Fb afi=ip contribution=filtered dst-address=5.101.88.0/24 routing-table=main pref-src=192.0.2.1 gateway=192.0.2.2
33+
immediate-gw=192.0.2.2%[sfp28-10] distance=20 scope=40 target-scope=10 belongs-to="bgp-IP-192.0.2.2"
3434
rpki=invalid bgp.session=TRANSIT-ANGOLA-v4-1 .as-path="37468,41095,51601,50113,207569" .communities=37468:14100,37468:2000 .med=0 .origin=incomplete
3535
"""
3636

0 commit comments

Comments
 (0)