summaryrefslogtreecommitdiffstats
path: root/isisd
diff options
context:
space:
mode:
Diffstat (limited to 'isisd')
-rw-r--r--isisd/isis_spf.c2
-rw-r--r--isisd/isis_tlvs.c10
2 files changed, 10 insertions, 2 deletions
diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c
index 7a4b45a..3b3e1fd 100644
--- a/isisd/isis_spf.c
+++ b/isisd/isis_spf.c
@@ -703,6 +703,7 @@ static void isis_spf_add_local(struct isis_spftree *spftree,
} else { /* vertex->d_N > cost */
/* f) */
isis_vertex_queue_delete(&spftree->tents, vertex);
+ hash_release(spftree->prefix_sids, vertex);
isis_vertex_del(vertex);
}
}
@@ -808,6 +809,7 @@ static void process_N(struct isis_spftree *spftree, enum vertextype vtype,
/* 4) */
} else {
isis_vertex_queue_delete(&spftree->tents, vertex);
+ hash_release(spftree->prefix_sids, vertex);
isis_vertex_del(vertex);
}
}
diff --git a/isisd/isis_tlvs.c b/isisd/isis_tlvs.c
index 2b0a58b..93ae8c6 100644
--- a/isisd/isis_tlvs.c
+++ b/isisd/isis_tlvs.c
@@ -8016,7 +8016,6 @@ void isis_tlvs_add_extended_ip_reach(struct isis_tlvs *tlvs,
apply_mask_ipv4(&r->prefix);
if (pcfgs) {
- r->subtlvs = isis_alloc_subtlvs(ISIS_CONTEXT_SUBTLV_IP_REACH);
for (int i = 0; i < SR_ALGORITHM_COUNT; i++) {
struct isis_prefix_sid *psid;
struct sr_prefix_cfg *pcfg = pcfgs[i];
@@ -8026,6 +8025,10 @@ void isis_tlvs_add_extended_ip_reach(struct isis_tlvs *tlvs,
psid = XCALLOC(MTYPE_ISIS_SUBTLV, sizeof(*psid));
isis_sr_prefix_cfg2subtlv(pcfg, external, psid);
+
+ if (!r->subtlvs)
+ r->subtlvs = isis_alloc_subtlvs(
+ ISIS_CONTEXT_SUBTLV_IP_REACH);
append_item(&r->subtlvs->prefix_sids,
(struct isis_item *)psid);
}
@@ -8044,7 +8047,6 @@ void isis_tlvs_add_ipv6_reach(struct isis_tlvs *tlvs, uint16_t mtid,
memcpy(&r->prefix, dest, sizeof(*dest));
apply_mask_ipv6(&r->prefix);
if (pcfgs) {
- r->subtlvs = isis_alloc_subtlvs(ISIS_CONTEXT_SUBTLV_IP_REACH);
for (int i = 0; i < SR_ALGORITHM_COUNT; i++) {
struct isis_prefix_sid *psid;
struct sr_prefix_cfg *pcfg = pcfgs[i];
@@ -8054,6 +8056,10 @@ void isis_tlvs_add_ipv6_reach(struct isis_tlvs *tlvs, uint16_t mtid,
psid = XCALLOC(MTYPE_ISIS_SUBTLV, sizeof(*psid));
isis_sr_prefix_cfg2subtlv(pcfg, external, psid);
+
+ if (!r->subtlvs)
+ r->subtlvs = isis_alloc_subtlvs(
+ ISIS_CONTEXT_SUBTLV_IPV6_REACH);
append_item(&r->subtlvs->prefix_sids,
(struct isis_item *)psid);
}