diff options
author | Donald Sharp <sharpd@nvidia.com> | 2022-06-18 20:37:14 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2022-06-23 20:06:49 +0200 |
commit | 91a5bbc4de1bfe03618b5c4d11cf32f45e20e8e7 (patch) | |
tree | 43cf0251f8df96097a5d89a7c62c09a9c23583dd /isisd/isis_te.c | |
parent | tests: Increase time for zebra_seg6local to look for sharp routes (diff) | |
download | frr-91a5bbc4de1bfe03618b5c4d11cf32f45e20e8e7.tar.xz frr-91a5bbc4de1bfe03618b5c4d11cf32f45e20e8e7.zip |
isisd: Fix crash with xfrm interface type
When creating a xfrm interface FRR is crashing when configured
with isis. This is because the weird pattern of not allocating
list's until needed and then allowing the crash when we have
a usage pattern that was not expected. Just always allocate
the different lists that a circuit needs.
(gdb) bt
(gdb)
Fixes #11432
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'isisd/isis_te.c')
-rw-r--r-- | isisd/isis_te.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/isisd/isis_te.c b/isisd/isis_te.c index 579ae6aab..3faff1cc4 100644 --- a/isisd/isis_te.c +++ b/isisd/isis_te.c @@ -108,8 +108,7 @@ void isis_link_params_update(struct isis_circuit *circuit, UNSET_SUBTLV(ext, EXT_ADM_GRP); /* If known, register local IPv4 addr from ip_addr list */ - if (circuit->ip_addrs != NULL - && listcount(circuit->ip_addrs) != 0) { + if (listcount(circuit->ip_addrs) != 0) { addr = (struct prefix_ipv4 *)listgetdata( (struct listnode *)listhead(circuit->ip_addrs)); IPV4_ADDR_COPY(&ext->local_addr, &addr->prefix); @@ -118,8 +117,7 @@ void isis_link_params_update(struct isis_circuit *circuit, UNSET_SUBTLV(ext, EXT_LOCAL_ADDR); /* If known, register local IPv6 addr from ip_addr list */ - if (circuit->ipv6_non_link != NULL - && listcount(circuit->ipv6_non_link) != 0) { + if (listcount(circuit->ipv6_non_link) != 0) { addr6 = (struct prefix_ipv6 *)listgetdata( (struct listnode *)listhead( circuit->ipv6_non_link)); |