mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 08:50:26 +00:00
tests: fix BFD C-bit topotest
When a BFD down notification is received and the C-bit is set in both directions, any ongoing graceful restart should be aborted and stale routes removed from the RIB. This commit updates the `bfd_bgp_cbit_topo3` topotest accordingly to fix the expected outcomes in the `test_bfd_loss_intermediate` test. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
d315382d47
commit
790c207fa9
@ -4,51 +4,6 @@
|
|||||||
"localAS": 101,
|
"localAS": 101,
|
||||||
"routes":
|
"routes":
|
||||||
{
|
{
|
||||||
"2001:db8:6::/64": [
|
|
||||||
{
|
|
||||||
"stale": true,
|
|
||||||
"valid": true,
|
|
||||||
"bestpath": true,
|
|
||||||
"pathFrom": "external",
|
|
||||||
"prefix": "2001:db8:6::",
|
|
||||||
"prefixLen": 64,
|
|
||||||
"network": "2001:db8:6::\/64",
|
|
||||||
"metric": 0,
|
|
||||||
"weight": 0,
|
|
||||||
"peerId": "2001:db8:4::1",
|
|
||||||
"origin": "IGP",
|
|
||||||
"nexthops": [
|
|
||||||
{ "ip": "2001:db8:4::1",
|
|
||||||
"afi": "ipv6",
|
|
||||||
"scope": "global",
|
|
||||||
"used": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"2001:db8:7::/64": [
|
|
||||||
{
|
|
||||||
"stale": true,
|
|
||||||
"valid": true,
|
|
||||||
"bestpath": true,
|
|
||||||
"pathFrom": "external",
|
|
||||||
"prefix": "2001:db8:7::",
|
|
||||||
"prefixLen": 64, "network":
|
|
||||||
"2001:db8:7::\/64",
|
|
||||||
"metric": 0,
|
|
||||||
"weight": 0,
|
|
||||||
"peerId": "2001:db8:4::1",
|
|
||||||
"origin": "IGP",
|
|
||||||
"nexthops": [
|
|
||||||
{
|
|
||||||
"ip": "2001:db8:4::1",
|
|
||||||
"afi": "ipv6",
|
|
||||||
"scope": "global",
|
|
||||||
"used": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"2001:db8:8::/64": [
|
"2001:db8:8::/64": [
|
||||||
{
|
{
|
||||||
"valid": true,
|
"valid": true,
|
||||||
|
@ -32,49 +32,5 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
|
||||||
"2001:db8:6::/64": [{
|
|
||||||
"distance": 20,
|
|
||||||
"protocol": "bgp",
|
|
||||||
"metric": 0,
|
|
||||||
"selected": true,
|
|
||||||
"destSelected": true,
|
|
||||||
"prefix": "2001:db8:6::/64",
|
|
||||||
"nexthops": [{
|
|
||||||
"ip":"2001:db8:4::1",
|
|
||||||
"active": true,
|
|
||||||
"afi": "ipv6",
|
|
||||||
"recursive":true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fib":true,
|
|
||||||
"ip":"2001:db8:1::2",
|
|
||||||
"afi": "ipv6",
|
|
||||||
"interfaceName": "r1-eth0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"2001:db8:7::/64": [{
|
|
||||||
"distance": 20,
|
|
||||||
"protocol": "bgp",
|
|
||||||
"metric": 0,
|
|
||||||
"selected": true,
|
|
||||||
"destSelected": true,
|
|
||||||
"prefix": "2001:db8:7::/64",
|
|
||||||
"nexthops": [{
|
|
||||||
"ip":"2001:db8:4::1",
|
|
||||||
"active": true,
|
|
||||||
"afi": "ipv6",
|
|
||||||
"recursive": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fib":true,
|
|
||||||
"ip":"2001:db8:1::2",
|
|
||||||
"afi": "ipv6",
|
|
||||||
"interfaceName":"r1-eth0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -122,8 +122,8 @@ def test_bfd_connection():
|
|||||||
|
|
||||||
def test_bfd_loss_intermediate():
|
def test_bfd_loss_intermediate():
|
||||||
"""
|
"""
|
||||||
Assert that BFD notices the bfd link down failure.
|
Assert that BGP notices the BFD link down failure.
|
||||||
but BGP entries should still be present
|
The BGP entries should be flushed as the C-bit is set in both directions.
|
||||||
"""
|
"""
|
||||||
tgen = get_topogen()
|
tgen = get_topogen()
|
||||||
if tgen.routers_have_failure():
|
if tgen.routers_have_failure():
|
||||||
@ -160,7 +160,7 @@ def test_bfd_loss_intermediate():
|
|||||||
assertmsg = '"{}" JSON output mismatches'.format(router.name)
|
assertmsg = '"{}" JSON output mismatches'.format(router.name)
|
||||||
assert result is None, assertmsg
|
assert result is None, assertmsg
|
||||||
|
|
||||||
logger.info("waiting for BGP entries to become stale")
|
logger.info("waiting for BGP entries to be removed")
|
||||||
for router in tgen.routers().values():
|
for router in tgen.routers().values():
|
||||||
if router.name == "r2":
|
if router.name == "r2":
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user