mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-27 15:22:35 +00:00
Merge pull request #14111 from opensourcerouting/isisd-tilfa-topotest-fixes
tests: improve stability of the IS-IS TI-LFA topotest
This commit is contained in:
commit
aba77de946
@ -923,13 +923,14 @@ static int sr_adj_ip_disabled(struct isis_adjacency *adj, int family,
|
||||
}
|
||||
|
||||
/**
|
||||
* Activate local Prefix-SID when loopback interface goes up for IS-IS.
|
||||
* Update the Node-SID flag of the configured Prefix-SID mappings in response
|
||||
* to an address addition or removal event.
|
||||
*
|
||||
* @param ifp Loopback Interface
|
||||
* @param ifp Interface
|
||||
*
|
||||
* @return 0
|
||||
*/
|
||||
static int sr_if_new_hook(struct interface *ifp)
|
||||
int sr_if_addr_update(struct interface *ifp)
|
||||
{
|
||||
struct sr_prefix_cfg *pcfgs[SR_ALGORITHM_COUNT] = {NULL};
|
||||
struct isis_circuit *circuit;
|
||||
@ -947,13 +948,7 @@ static int sr_if_new_hook(struct interface *ifp)
|
||||
if (!area)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Update the Node-SID flag of the configured Prefix-SID mappings if
|
||||
* necessary. This needs to be done here since isisd reads the startup
|
||||
* configuration before receiving interface information from zebra.
|
||||
*/
|
||||
FOR_ALL_INTERFACES_ADDRESSES (ifp, connected, node) {
|
||||
|
||||
for (int i = 0; i < SR_ALGORITHM_COUNT; i++) {
|
||||
pcfgs[i] = isis_sr_cfg_prefix_find(
|
||||
area, connected->address, i);
|
||||
@ -1313,7 +1308,6 @@ void isis_sr_init(void)
|
||||
hook_register(isis_adj_state_change_hook, sr_adj_state_change);
|
||||
hook_register(isis_adj_ip_enabled_hook, sr_adj_ip_enabled);
|
||||
hook_register(isis_adj_ip_disabled_hook, sr_adj_ip_disabled);
|
||||
hook_register(isis_if_new_hook, sr_if_new_hook);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1325,5 +1319,4 @@ void isis_sr_term(void)
|
||||
hook_unregister(isis_adj_state_change_hook, sr_adj_state_change);
|
||||
hook_unregister(isis_adj_ip_enabled_hook, sr_adj_ip_enabled);
|
||||
hook_unregister(isis_adj_ip_disabled_hook, sr_adj_ip_disabled);
|
||||
hook_unregister(isis_if_new_hook, sr_if_new_hook);
|
||||
}
|
||||
|
@ -222,6 +222,7 @@ extern struct sr_adjacency *isis_sr_adj_sid_find(struct isis_adjacency *adj,
|
||||
int family,
|
||||
enum sr_adj_type type);
|
||||
extern void isis_area_delete_backup_adj_sids(struct isis_area *area, int level);
|
||||
extern int sr_if_addr_update(struct interface *ifp);
|
||||
extern char *sr_op2str(char *buf, size_t size, mpls_label_t label_in,
|
||||
mpls_label_t label_out);
|
||||
extern int isis_sr_start(struct isis_area *area);
|
||||
|
@ -98,6 +98,8 @@ static int isis_zebra_if_address_add(ZAPI_CALLBACK_ARGS)
|
||||
isis_circuit_add_addr(circuit, c);
|
||||
}
|
||||
|
||||
sr_if_addr_update(c->ifp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -125,6 +127,8 @@ static int isis_zebra_if_address_del(ZAPI_CALLBACK_ARGS)
|
||||
isis_circuit_del_addr(circuit, c);
|
||||
}
|
||||
|
||||
sr_if_addr_update(c->ifp);
|
||||
|
||||
connected_free(&c);
|
||||
|
||||
return 0;
|
||||
|
@ -17,7 +17,7 @@ interface eth-sw1
|
||||
ip router isis 1
|
||||
ipv6 router isis 1
|
||||
isis hello-interval 1
|
||||
isis hello-multiplier 3
|
||||
isis hello-multiplier 10
|
||||
isis priority 100
|
||||
isis fast-reroute ti-lfa
|
||||
!
|
||||
|
@ -11,14 +11,14 @@
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0003",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 64,
|
||||
"state": "up"
|
||||
},
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0002",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 64,
|
||||
"state": "up"
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ interface eth-sw1
|
||||
ip router isis 1
|
||||
ipv6 router isis 1
|
||||
isis hello-interval 1
|
||||
isis hello-multiplier 3
|
||||
isis hello-multiplier 10
|
||||
isis fast-reroute ti-lfa
|
||||
!
|
||||
interface eth-rt4-1
|
||||
@ -24,7 +24,7 @@ interface eth-rt4-1
|
||||
ipv6 router isis 1
|
||||
isis network point-to-point
|
||||
isis hello-interval 1
|
||||
isis hello-multiplier 3
|
||||
isis hello-multiplier 10
|
||||
isis fast-reroute ti-lfa
|
||||
!
|
||||
interface eth-rt4-2
|
||||
@ -32,7 +32,7 @@ interface eth-rt4-2
|
||||
ipv6 router isis 1
|
||||
isis network point-to-point
|
||||
isis hello-interval 1
|
||||
isis hello-multiplier 3
|
||||
isis hello-multiplier 10
|
||||
isis fast-reroute ti-lfa
|
||||
!
|
||||
router isis 1
|
||||
|
@ -11,7 +11,7 @@
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0004",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 0,
|
||||
"state": "up"
|
||||
}
|
||||
@ -30,7 +30,7 @@
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0004",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 0,
|
||||
"state": "up"
|
||||
}
|
||||
@ -49,14 +49,14 @@
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0001",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 100,
|
||||
"state": "up"
|
||||
},
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0003",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 64,
|
||||
"state": "up"
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ interface eth-sw1
|
||||
ip router isis 1
|
||||
ipv6 router isis 1
|
||||
isis hello-interval 1
|
||||
isis hello-multiplier 3
|
||||
isis hello-multiplier 10
|
||||
isis fast-reroute ti-lfa
|
||||
!
|
||||
interface eth-rt5-1
|
||||
@ -24,7 +24,7 @@ interface eth-rt5-1
|
||||
ipv6 router isis 1
|
||||
isis network point-to-point
|
||||
isis hello-interval 1
|
||||
isis hello-multiplier 3
|
||||
isis hello-multiplier 10
|
||||
isis fast-reroute ti-lfa
|
||||
!
|
||||
interface eth-rt5-2
|
||||
@ -32,7 +32,7 @@ interface eth-rt5-2
|
||||
ipv6 router isis 1
|
||||
isis network point-to-point
|
||||
isis hello-interval 1
|
||||
isis hello-multiplier 3
|
||||
isis hello-multiplier 10
|
||||
isis fast-reroute ti-lfa
|
||||
!
|
||||
router isis 1
|
||||
|
@ -11,7 +11,7 @@
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0005",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 0,
|
||||
"state": "up"
|
||||
}
|
||||
@ -30,7 +30,7 @@
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0005",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 0,
|
||||
"state": "up"
|
||||
}
|
||||
@ -49,14 +49,14 @@
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0001",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 100,
|
||||
"state": "up"
|
||||
},
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0002",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 64,
|
||||
"state": "up"
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ interface eth-rt2-1
|
||||
ipv6 router isis 1
|
||||
isis network point-to-point
|
||||
isis hello-interval 1
|
||||
isis hello-multiplier 3
|
||||
isis hello-multiplier 10
|
||||
isis fast-reroute ti-lfa
|
||||
!
|
||||
interface eth-rt2-2
|
||||
@ -25,7 +25,7 @@ interface eth-rt2-2
|
||||
ipv6 router isis 1
|
||||
isis network point-to-point
|
||||
isis hello-interval 1
|
||||
isis hello-multiplier 3
|
||||
isis hello-multiplier 10
|
||||
isis fast-reroute ti-lfa
|
||||
!
|
||||
interface eth-rt5
|
||||
@ -33,7 +33,7 @@ interface eth-rt5
|
||||
ipv6 router isis 1
|
||||
isis network point-to-point
|
||||
isis hello-interval 1
|
||||
isis hello-multiplier 3
|
||||
isis hello-multiplier 10
|
||||
isis fast-reroute ti-lfa
|
||||
!
|
||||
interface eth-rt6
|
||||
@ -41,7 +41,7 @@ interface eth-rt6
|
||||
ipv6 router isis 1
|
||||
isis network point-to-point
|
||||
isis hello-interval 1
|
||||
isis hello-multiplier 3
|
||||
isis hello-multiplier 10
|
||||
isis fast-reroute ti-lfa
|
||||
!
|
||||
router isis 1
|
||||
|
@ -11,7 +11,7 @@
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0002",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 0,
|
||||
"state": "up"
|
||||
}
|
||||
@ -30,7 +30,7 @@
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0002",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 0,
|
||||
"state": "up"
|
||||
}
|
||||
@ -49,7 +49,7 @@
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0005",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 0,
|
||||
"state": "up"
|
||||
}
|
||||
@ -68,7 +68,7 @@
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0006",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 0,
|
||||
"state": "up"
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ interface eth-rt3-1
|
||||
ipv6 router isis 1
|
||||
isis network point-to-point
|
||||
isis hello-interval 1
|
||||
isis hello-multiplier 3
|
||||
isis hello-multiplier 10
|
||||
isis fast-reroute ti-lfa
|
||||
!
|
||||
interface eth-rt3-2
|
||||
@ -25,7 +25,7 @@ interface eth-rt3-2
|
||||
ipv6 router isis 1
|
||||
isis network point-to-point
|
||||
isis hello-interval 1
|
||||
isis hello-multiplier 3
|
||||
isis hello-multiplier 10
|
||||
isis fast-reroute ti-lfa
|
||||
!
|
||||
interface eth-rt4
|
||||
@ -33,7 +33,7 @@ interface eth-rt4
|
||||
ipv6 router isis 1
|
||||
isis network point-to-point
|
||||
isis hello-interval 1
|
||||
isis hello-multiplier 3
|
||||
isis hello-multiplier 10
|
||||
isis fast-reroute ti-lfa
|
||||
!
|
||||
interface eth-rt6
|
||||
@ -41,7 +41,7 @@ interface eth-rt6
|
||||
ipv6 router isis 1
|
||||
isis network point-to-point
|
||||
isis hello-interval 1
|
||||
isis hello-multiplier 3
|
||||
isis hello-multiplier 10
|
||||
isis fast-reroute ti-lfa
|
||||
!
|
||||
router isis 1
|
||||
|
@ -11,7 +11,7 @@
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0003",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 0,
|
||||
"state": "up"
|
||||
}
|
||||
@ -30,7 +30,7 @@
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0003",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 0,
|
||||
"state": "up"
|
||||
}
|
||||
@ -49,7 +49,7 @@
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0004",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 0,
|
||||
"state": "up"
|
||||
}
|
||||
@ -68,7 +68,7 @@
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0006",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 0,
|
||||
"state": "up"
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ interface eth-rt4
|
||||
ipv6 router isis 1
|
||||
isis network point-to-point
|
||||
isis hello-interval 1
|
||||
isis hello-multiplier 3
|
||||
isis hello-multiplier 10
|
||||
isis fast-reroute ti-lfa
|
||||
!
|
||||
interface eth-rt5
|
||||
@ -25,7 +25,7 @@ interface eth-rt5
|
||||
ipv6 router isis 1
|
||||
isis network point-to-point
|
||||
isis hello-interval 1
|
||||
isis hello-multiplier 3
|
||||
isis hello-multiplier 10
|
||||
isis fast-reroute ti-lfa
|
||||
!
|
||||
router isis 1
|
||||
|
@ -11,7 +11,7 @@
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0004",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 0,
|
||||
"state": "up"
|
||||
}
|
||||
@ -30,7 +30,7 @@
|
||||
{
|
||||
"neighbor-sys-type": "level-1",
|
||||
"neighbor-sysid": "0000.0000.0005",
|
||||
"hold-timer": 3,
|
||||
"hold-timer": 10,
|
||||
"neighbor-priority": 0,
|
||||
"state": "up"
|
||||
}
|
||||
|
@ -818,19 +818,19 @@ def test_rt6_step11():
|
||||
rname,
|
||||
"show ip route isis json",
|
||||
outputs[rname][11]["show_ip_route.ref"],
|
||||
count=10,
|
||||
count=20,
|
||||
)
|
||||
router_compare_json_output(
|
||||
rname,
|
||||
"show ipv6 route isis json",
|
||||
outputs[rname][11]["show_ipv6_route.ref"],
|
||||
count=10,
|
||||
count=20,
|
||||
)
|
||||
router_compare_json_output(
|
||||
rname,
|
||||
"show mpls table json",
|
||||
outputs[rname][11]["show_mpls_table.ref"],
|
||||
count=10,
|
||||
count=20,
|
||||
)
|
||||
|
||||
|
||||
@ -946,6 +946,15 @@ def test_rib_ipv4_step13():
|
||||
tgen.net["rt5"].cmd('vtysh -c "conf t" -c "int eth-rt6" -c "isis bfd"')
|
||||
tgen.net["rt6"].cmd('vtysh -c "conf t" -c "int eth-rt5" -c "isis bfd"')
|
||||
|
||||
expect = (
|
||||
'[{"multihop":false,"peer":"10.0.8.5","interface":"eth-rt5","status":"up"}]'
|
||||
)
|
||||
router_compare_json_output(
|
||||
rname,
|
||||
"show bfd peers json",
|
||||
expect,
|
||||
)
|
||||
|
||||
|
||||
def test_rib_ipv6_step13():
|
||||
logger.info("Test (step 13): verify IPv6 RIB")
|
||||
@ -1015,7 +1024,7 @@ def test_rt6_step14():
|
||||
rname,
|
||||
"show ip route isis json",
|
||||
outputs[rname][11]["show_ip_route.ref"],
|
||||
count=10,
|
||||
count=20,
|
||||
)
|
||||
router_compare_json_output(
|
||||
rname,
|
||||
@ -1028,7 +1037,7 @@ def test_rt6_step14():
|
||||
rname,
|
||||
"show mpls table json",
|
||||
outputs[rname][11]["show_mpls_table.ref"],
|
||||
count=10,
|
||||
count=20,
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user