summaryrefslogtreecommitdiff
path: root/isisd/isis_lsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'isisd/isis_lsp.c')
-rw-r--r--isisd/isis_lsp.c335
1 files changed, 197 insertions, 138 deletions
diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c
index d569f6bd5b..c07083a06d 100644
--- a/isisd/isis_lsp.c
+++ b/isisd/isis_lsp.c
@@ -46,6 +46,7 @@
#include "isisd/fabricd.h"
#include "isisd/isis_tx_queue.h"
#include "isisd/isis_nb.h"
+#include "isisd/isis_flex_algo.h"
DEFINE_MTYPE_STATIC(ISISD, ISIS_LSP, "ISIS LSP");
@@ -193,10 +194,9 @@ int lsp_compare(char *areatag, struct isis_lsp *lsp, uint32_t seqno,
|| (lsp->hdr.rem_lifetime != 0 && rem_lifetime != 0))) {
if (IS_DEBUG_SNP_PACKETS) {
zlog_debug(
- "ISIS-Snp (%s): Compare LSP %s seq 0x%08x, cksum 0x%04hx, lifetime %hus",
- areatag, rawlspid_print(lsp->hdr.lsp_id),
- lsp->hdr.seqno, lsp->hdr.checksum,
- lsp->hdr.rem_lifetime);
+ "ISIS-Snp (%s): Compare LSP %pLS seq 0x%08x, cksum 0x%04hx, lifetime %hus",
+ areatag, lsp->hdr.lsp_id, lsp->hdr.seqno,
+ lsp->hdr.checksum, lsp->hdr.rem_lifetime);
zlog_debug(
"ISIS-Snp (%s): is equal to ours seq 0x%08x, cksum 0x%04hx, lifetime %hus",
areatag, seqno, checksum, rem_lifetime);
@@ -223,9 +223,9 @@ int lsp_compare(char *areatag, struct isis_lsp *lsp, uint32_t seqno,
&& lsp->hdr.rem_lifetime)))) {
if (IS_DEBUG_SNP_PACKETS) {
zlog_debug(
- "ISIS-Snp (%s): Compare LSP %s seq 0x%08x, cksum 0x%04hx, lifetime %hus",
- areatag, rawlspid_print(lsp->hdr.lsp_id), seqno,
- checksum, rem_lifetime);
+ "ISIS-Snp (%s): Compare LSP %pLS seq 0x%08x, cksum 0x%04hx, lifetime %hus",
+ areatag, lsp->hdr.lsp_id, seqno, checksum,
+ rem_lifetime);
zlog_debug(
"ISIS-Snp (%s): is newer than ours seq 0x%08x, cksum 0x%04hx, lifetime %hus",
areatag, lsp->hdr.seqno, lsp->hdr.checksum,
@@ -234,9 +234,10 @@ int lsp_compare(char *areatag, struct isis_lsp *lsp, uint32_t seqno,
return LSP_NEWER;
}
if (IS_DEBUG_SNP_PACKETS) {
- zlog_debug("ISIS-Snp (%s): Compare LSP %s seq 0x%08x, cksum 0x%04hx, lifetime %hus",
- areatag, rawlspid_print(lsp->hdr.lsp_id), seqno,
- checksum, rem_lifetime);
+ zlog_debug(
+ "ISIS-Snp (%s): Compare LSP %pLS seq 0x%08x, cksum 0x%04hx, lifetime %hus",
+ areatag, lsp->hdr.lsp_id, seqno, checksum,
+ rem_lifetime);
zlog_debug(
"ISIS-Snp (%s): is older than ours seq 0x%08x, cksum 0x%04hx, lifetime %hus",
areatag, lsp->hdr.seqno, lsp->hdr.checksum,
@@ -554,8 +555,8 @@ void lsp_update(struct isis_lsp *lsp, struct isis_lsp_hdr *hdr,
if (lsp->own_lsp) {
flog_err(
EC_LIB_DEVELOPMENT,
- "ISIS-Upd (%s): BUG updating LSP %s still marked as own LSP",
- area->area_tag, rawlspid_print(lsp->hdr.lsp_id));
+ "ISIS-Upd (%s): BUG updating LSP %pLS still marked as own LSP",
+ area->area_tag, lsp->hdr.lsp_id);
lsp_clear_data(lsp);
lsp->own_lsp = 0;
}
@@ -634,10 +635,8 @@ struct isis_lsp *lsp_new(struct isis_area *area, uint8_t *lsp_id,
put_lsp_hdr(lsp, NULL, false);
if (IS_DEBUG_EVENTS)
- zlog_debug("New LSP with ID %s-%02x-%02x len %d seqnum %08x",
- sysid_print(lsp_id), LSP_PSEUDO_ID(lsp->hdr.lsp_id),
- LSP_FRAGMENT(lsp->hdr.lsp_id), lsp->hdr.pdu_len,
- lsp->hdr.seqno);
+ zlog_debug("New LSP with ID %pLS len %d seqnum %08x", lsp_id,
+ lsp->hdr.pdu_len, lsp->hdr.seqno);
return lsp;
}
@@ -704,7 +703,7 @@ void lspid_print(uint8_t *lsp_id, char *dest, size_t dest_len, char dynhost,
else if (!memcmp(isis->sysid, lsp_id, ISIS_SYS_ID_LEN) && dynhost)
snprintf(id, sizeof(id), "%.14s", cmd_hostname_get());
else
- memcpy(id, sysid_print(lsp_id), 15);
+ snprintf(id, sizeof(id), "%pSY", lsp_id);
if (frag)
snprintf(dest, dest_len, "%s.%02x-%02x", id,
@@ -881,6 +880,65 @@ static uint16_t lsp_refresh_time(struct isis_lsp *lsp, uint16_t rem_lifetime)
return refresh_time;
}
+static void lsp_build_internal_reach_ipv4(struct isis_lsp *lsp,
+ struct isis_area *area,
+ struct prefix_ipv4 *ipv4,
+ uint32_t metric)
+{
+ struct sr_prefix_cfg *pcfgs[SR_ALGORITHM_COUNT] = {NULL};
+
+ if (area->oldmetric) {
+ lsp_debug(
+ "ISIS (%s): Adding old-style IP reachability for %pFX",
+ area->area_tag, ipv4);
+ isis_tlvs_add_oldstyle_ip_reach(lsp->tlvs, ipv4, metric);
+ }
+
+ if (area->newmetric) {
+ lsp_debug("ISIS (%s): Adding te-style IP reachability for %pFX",
+ area->area_tag, ipv4);
+
+ if (area->srdb.enabled)
+ for (int i = 0; i < SR_ALGORITHM_COUNT; i++) {
+#ifndef FABRICD
+ if (flex_algo_id_valid(i) &&
+ !isis_flex_algo_elected_supported(i, area))
+ continue;
+#endif /* ifndef FABRICD */
+ pcfgs[i] =
+ isis_sr_cfg_prefix_find(area, ipv4, i);
+ }
+
+ isis_tlvs_add_extended_ip_reach(lsp->tlvs, ipv4, metric, false,
+ pcfgs);
+ }
+}
+
+static void lsp_build_internal_reach_ipv6(struct isis_lsp *lsp,
+ struct isis_area *area,
+ struct prefix_ipv6 *ipv6,
+ uint32_t metric)
+{
+ struct sr_prefix_cfg *pcfgs[SR_ALGORITHM_COUNT] = {NULL};
+
+ lsp_debug("ISIS (%s): Adding IPv6 reachability for %pFX",
+ area->area_tag, ipv6);
+
+ if (area->srdb.enabled)
+ for (int i = 0; i < SR_ALGORITHM_COUNT; i++) {
+#ifndef FABRICD
+ if (flex_algo_id_valid(i) &&
+ !isis_flex_algo_elected_supported(i, area))
+ continue;
+#endif /* ifndef FABRICD */
+ pcfgs[i] = isis_sr_cfg_prefix_find(area, ipv6, i);
+ }
+
+ isis_tlvs_add_ipv6_reach(lsp->tlvs, isis_area_ipv6_topology(area), ipv6,
+ metric, false, pcfgs);
+}
+
+
static void lsp_build_ext_reach_ipv4(struct isis_lsp *lsp,
struct isis_area *area)
{
@@ -906,13 +964,23 @@ static void lsp_build_ext_reach_ipv4(struct isis_lsp *lsp,
isis_tlvs_add_oldstyle_ip_reach(lsp->tlvs, ipv4,
metric);
if (area->newmetric) {
- struct sr_prefix_cfg *pcfg = NULL;
+ struct sr_prefix_cfg *pcfgs[SR_ALGORITHM_COUNT] = {
+ NULL};
if (area->srdb.enabled)
- pcfg = isis_sr_cfg_prefix_find(area, ipv4);
+ for (int i = 0; i < SR_ALGORITHM_COUNT; i++) {
+#ifndef FABRICD
+ if (flex_algo_id_valid(i) &&
+ !isis_flex_algo_elected_supported(
+ i, area))
+ continue;
+#endif /* ifndef FABRICD */
+ pcfgs[i] = isis_sr_cfg_prefix_find(
+ area, ipv4, i);
+ }
isis_tlvs_add_extended_ip_reach(lsp->tlvs, ipv4, metric,
- true, pcfg);
+ true, pcfgs);
}
}
}
@@ -940,14 +1008,24 @@ static void lsp_build_ext_reach_ipv6(struct isis_lsp *lsp,
metric = MAX_WIDE_PATH_METRIC;
if (!src_p || !src_p->prefixlen) {
- struct sr_prefix_cfg *pcfg = NULL;
+ struct sr_prefix_cfg *pcfgs[SR_ALGORITHM_COUNT] = {
+ NULL};
if (area->srdb.enabled)
- pcfg = isis_sr_cfg_prefix_find(area, p);
+ for (int i = 0; i < SR_ALGORITHM_COUNT; i++) {
+#ifndef FABRICD
+ if (flex_algo_id_valid(i) &&
+ !isis_flex_algo_elected_supported(
+ i, area))
+ continue;
+#endif /* ifndef FABRICD */
+ pcfgs[i] = isis_sr_cfg_prefix_find(
+ area, p, i);
+ }
isis_tlvs_add_ipv6_reach(lsp->tlvs,
isis_area_ipv6_topology(area),
- p, metric, true, pcfg);
+ p, metric, true, pcfgs);
} else if (isis_area_ipv6_dstsrc_enabled(area)) {
isis_tlvs_add_ipv6_dstsrc_reach(lsp->tlvs,
ISIS_MT_IPV6_DSTSRC,
@@ -1064,9 +1142,30 @@ static void lsp_build(struct isis_lsp *lsp, struct isis_area *area)
/* Add Router Capability TLV. */
if (area->isis->router_id != 0) {
- struct isis_router_cap cap = {};
+ struct isis_router_cap *rcap;
+#ifndef FABRICD
+ struct isis_router_cap_fad *rcap_fad;
+ struct listnode *node;
+ struct flex_algo *fa;
+#endif /* ifndef FABRICD */
- cap.router_id.s_addr = area->isis->router_id;
+ rcap = isis_tlvs_init_router_capability(lsp->tlvs);
+
+ rcap->router_id.s_addr = area->isis->router_id;
+
+#ifndef FABRICD
+ /* Set flex-algo definitions */
+ for (ALL_LIST_ELEMENTS_RO(area->flex_algos->flex_algos, node,
+ fa)) {
+ if (!fa->advertise_definition)
+ continue;
+ lsp_debug("ISIS (%s): Flex-Algo Definition %u",
+ area->area_tag, fa->algorithm);
+ isis_tlvs_set_router_capability_fad(lsp->tlvs, fa,
+ fa->algorithm,
+ area->isis->sysid);
+ }
+#endif /* ifndef FABRICD */
/* Add SR Sub-TLVs if SR is enabled. */
if (area->srdb.enabled) {
@@ -1076,30 +1175,38 @@ static void lsp_build(struct isis_lsp *lsp, struct isis_area *area)
/* SRGB first */
range_size = srdb->config.srgb_upper_bound
- srdb->config.srgb_lower_bound + 1;
- cap.srgb.flags = ISIS_SUBTLV_SRGB_FLAG_I
- | ISIS_SUBTLV_SRGB_FLAG_V;
- cap.srgb.range_size = range_size;
- cap.srgb.lower_bound = srdb->config.srgb_lower_bound;
+ rcap->srgb.flags = ISIS_SUBTLV_SRGB_FLAG_I |
+ ISIS_SUBTLV_SRGB_FLAG_V;
+ rcap->srgb.range_size = range_size;
+ rcap->srgb.lower_bound = srdb->config.srgb_lower_bound;
/* Then Algorithm */
- cap.algo[0] = SR_ALGORITHM_SPF;
- cap.algo[1] = SR_ALGORITHM_UNSET;
+ rcap->algo[0] = SR_ALGORITHM_SPF;
+ rcap->algo[1] = SR_ALGORITHM_UNSET;
+#ifndef FABRICD
+ for (ALL_LIST_ELEMENTS_RO(area->flex_algos->flex_algos,
+ node, fa)) {
+ if (fa->advertise_definition)
+ rcap_fad = rcap->fads[fa->algorithm];
+ else
+ rcap_fad = NULL;
+
+ if (!isis_flex_algo_elected_supported_local_fad(
+ fa->algorithm, area, &rcap_fad))
+ continue;
+ lsp_debug("ISIS (%s): SR Algorithm %u",
+ area->area_tag, fa->algorithm);
+ rcap->algo[fa->algorithm] = fa->algorithm;
+ }
+#endif /* ifndef FABRICD */
/* SRLB */
- cap.srlb.flags = 0;
+ rcap->srlb.flags = 0;
range_size = srdb->config.srlb_upper_bound
- srdb->config.srlb_lower_bound + 1;
- cap.srlb.range_size = range_size;
- cap.srlb.lower_bound = srdb->config.srlb_lower_bound;
+ rcap->srlb.range_size = range_size;
+ rcap->srlb.lower_bound = srdb->config.srlb_lower_bound;
/* And finally MSD */
- cap.msd = srdb->config.msd;
- } else {
- /* Disable SR Algorithm */
- cap.algo[0] = SR_ALGORITHM_UNSET;
- cap.algo[1] = SR_ALGORITHM_UNSET;
+ rcap->msd = srdb->config.msd;
}
-
- isis_tlvs_set_router_capability(lsp->tlvs, &cap);
- lsp_debug("ISIS (%s): Adding Router Capabilities information",
- area->area_tag);
}
/* IPv4 address and TE router ID TLVs.
@@ -1189,31 +1296,9 @@ static void lsp_build(struct isis_lsp *lsp, struct isis_area *area)
struct listnode *ipnode;
struct prefix_ipv4 *ipv4;
for (ALL_LIST_ELEMENTS_RO(circuit->ip_addrs, ipnode,
- ipv4)) {
- if (area->oldmetric) {
- lsp_debug(
- "ISIS (%s): Adding old-style IP reachability for %pFX",
- area->area_tag, ipv4);
- isis_tlvs_add_oldstyle_ip_reach(
- lsp->tlvs, ipv4, metric);
- }
-
- if (area->newmetric) {
- struct sr_prefix_cfg *pcfg = NULL;
-
- lsp_debug(
- "ISIS (%s): Adding te-style IP reachability for %pFX",
- area->area_tag, ipv4);
-
- if (area->srdb.enabled)
- pcfg = isis_sr_cfg_prefix_find(
- area, ipv4);
-
- isis_tlvs_add_extended_ip_reach(
- lsp->tlvs, ipv4, metric, false,
- pcfg);
- }
- }
+ ipv4))
+ lsp_build_internal_reach_ipv4(lsp, area, ipv4,
+ metric);
}
if (circuit->ipv6_router && circuit->ipv6_non_link->count > 0) {
@@ -1221,22 +1306,9 @@ static void lsp_build(struct isis_lsp *lsp, struct isis_area *area)
struct prefix_ipv6 *ipv6;
for (ALL_LIST_ELEMENTS_RO(circuit->ipv6_non_link,
- ipnode, ipv6)) {
- struct sr_prefix_cfg *pcfg = NULL;
-
- lsp_debug(
- "ISIS (%s): Adding IPv6 reachability for %pFX",
- area->area_tag, ipv6);
-
- if (area->srdb.enabled)
- pcfg = isis_sr_cfg_prefix_find(area,
- ipv6);
-
- isis_tlvs_add_ipv6_reach(
- lsp->tlvs,
- isis_area_ipv6_topology(area), ipv6,
- metric, false, pcfg);
- }
+ ipnode, ipv6))
+ lsp_build_internal_reach_ipv6(lsp, area, ipv6,
+ metric);
}
switch (circuit->circ_type) {
@@ -1250,10 +1322,8 @@ static void lsp_build(struct isis_lsp *lsp, struct isis_area *area)
if (LSP_PSEUDO_ID(ne_id)) {
if (area->oldmetric) {
lsp_debug(
- "ISIS (%s): Adding DIS %s.%02x as old-style neighbor",
- area->area_tag,
- sysid_print(ne_id),
- LSP_PSEUDO_ID(ne_id));
+ "ISIS (%s): Adding DIS %pPN as old-style neighbor",
+ area->area_tag, ne_id);
isis_tlvs_add_oldstyle_reach(
lsp->tlvs, ne_id,
metric);
@@ -1279,9 +1349,8 @@ static void lsp_build(struct isis_lsp *lsp, struct isis_area *area)
if (area->oldmetric) {
lsp_debug(
- "ISIS (%s): Adding old-style is reach for %s",
- area->area_tag,
- sysid_print(ne_id));
+ "ISIS (%s): Adding old-style is reach for %pSY",
+ area->area_tag, ne_id);
isis_tlvs_add_oldstyle_reach(
lsp->tlvs, ne_id, metric);
}
@@ -1424,12 +1493,12 @@ int lsp_generate(struct isis_area *area, int level)
refresh_time, &area->t_lsp_refresh[level - 1]);
if (IS_DEBUG_UPDATE_PACKETS) {
- zlog_debug("ISIS-Upd (%s): Building L%d LSP %s, len %hu, seq 0x%08x, cksum 0x%04hx, lifetime %hus refresh %hus",
- area->area_tag, level,
- rawlspid_print(newlsp->hdr.lsp_id),
- newlsp->hdr.pdu_len, newlsp->hdr.seqno,
- newlsp->hdr.checksum, newlsp->hdr.rem_lifetime,
- refresh_time);
+ zlog_debug(
+ "ISIS-Upd (%s): Building L%d LSP %pLS, len %hu, seq 0x%08x, cksum 0x%04hx, lifetime %hus refresh %hus",
+ area->area_tag, level, newlsp->hdr.lsp_id,
+ newlsp->hdr.pdu_len, newlsp->hdr.seqno,
+ newlsp->hdr.checksum, newlsp->hdr.rem_lifetime,
+ refresh_time);
}
sched_debug(
"ISIS (%s): Built L%d LSP. Set triggered regenerate to non-pending.",
@@ -1506,8 +1575,8 @@ static int lsp_regenerate(struct isis_area *area, int level)
if (IS_DEBUG_UPDATE_PACKETS) {
zlog_debug(
- "ISIS-Upd (%s): Refreshed our L%d LSP %s, len %hu, seq 0x%08x, cksum 0x%04hx, lifetime %hus refresh %hus",
- area->area_tag, level, rawlspid_print(lsp->hdr.lsp_id),
+ "ISIS-Upd (%s): Refreshed our L%d LSP %pLS, len %hu, seq 0x%08x, cksum 0x%04hx, lifetime %hus refresh %hus",
+ area->area_tag, level, lsp->hdr.lsp_id,
lsp->hdr.pdu_len, lsp->hdr.seqno, lsp->hdr.checksum,
lsp->hdr.rem_lifetime, refresh_time);
}
@@ -1698,9 +1767,9 @@ static void lsp_build_pseudo(struct isis_lsp *lsp, struct isis_circuit *circuit,
lsp_clear_data(lsp);
lsp->tlvs = isis_alloc_tlvs();
lsp_debug(
- "ISIS (%s): Constructing pseudo LSP %s for interface %s level %d",
- area->area_tag, rawlspid_print(lsp->hdr.lsp_id),
- circuit->interface->name, level);
+ "ISIS (%s): Constructing pseudo LSP %pLS for interface %s level %d",
+ area->area_tag, lsp->hdr.lsp_id, circuit->interface->name,
+ level);
lsp->level = level;
/* RFC3787 section 4 SHOULD not set overload bit in pseudo LSPs */
@@ -1717,10 +1786,8 @@ static void lsp_build_pseudo(struct isis_lsp *lsp, struct isis_circuit *circuit,
if (circuit->area->oldmetric) {
isis_tlvs_add_oldstyle_reach(lsp->tlvs, ne_id, 0);
- lsp_debug(
- "ISIS (%s): Adding %s.%02x as old-style neighbor (self)",
- area->area_tag, sysid_print(ne_id),
- LSP_PSEUDO_ID(ne_id));
+ lsp_debug("ISIS (%s): Adding %pPN as old-style neighbor (self)",
+ area->area_tag, ne_id);
}
if (circuit->area->newmetric) {
if (area_is_mt(circuit->area))
@@ -1728,10 +1795,8 @@ static void lsp_build_pseudo(struct isis_lsp *lsp, struct isis_circuit *circuit,
else
mtid = ISIS_MT_DISABLE;
isis_tlvs_add_extended_reach(lsp->tlvs, mtid, ne_id, 0, NULL);
- lsp_debug(
- "ISIS (%s): Adding %s.%02x as te-style neighbor (self)",
- area->area_tag, sysid_print(ne_id),
- LSP_PSEUDO_ID(ne_id));
+ lsp_debug("ISIS (%s): Adding %pPN as te-style neighbor (self)",
+ area->area_tag, ne_id);
}
adj_list = list_new();
@@ -1740,8 +1805,8 @@ static void lsp_build_pseudo(struct isis_lsp *lsp, struct isis_circuit *circuit,
for (ALL_LIST_ELEMENTS_RO(adj_list, node, adj)) {
if (!(adj->level & level)) {
lsp_debug(
- "ISIS (%s): Ignoring neighbor %s, level does not intersect",
- area->area_tag, sysid_print(adj->sysid));
+ "ISIS (%s): Ignoring neighbor %pSY, level does not intersect",
+ area->area_tag, adj->sysid);
continue;
}
@@ -1753,8 +1818,8 @@ static void lsp_build_pseudo(struct isis_lsp *lsp, struct isis_circuit *circuit,
&& !(level == IS_LEVEL_2
&& adj->sys_type == ISIS_SYSTYPE_L2_IS)) {
lsp_debug(
- "ISIS (%s): Ignoring neighbor %s, level does not match",
- area->area_tag, sysid_print(adj->sysid));
+ "ISIS (%s): Ignoring neighbor %pSY, level does not match",
+ area->area_tag, adj->sysid);
continue;
}
@@ -1762,18 +1827,16 @@ static void lsp_build_pseudo(struct isis_lsp *lsp, struct isis_circuit *circuit,
if (circuit->area->oldmetric) {
isis_tlvs_add_oldstyle_reach(lsp->tlvs, ne_id, 0);
lsp_debug(
- "ISIS (%s): Adding %s.%02x as old-style neighbor (peer)",
- area->area_tag, sysid_print(ne_id),
- LSP_PSEUDO_ID(ne_id));
+ "ISIS (%s): Adding %pPN as old-style neighbor (peer)",
+ area->area_tag, ne_id);
}
if (circuit->area->newmetric) {
isis_tlvs_add_extended_reach(lsp->tlvs,
ISIS_MT_IPV4_UNICAST,
ne_id, 0, NULL);
lsp_debug(
- "ISIS (%s): Adding %s.%02x as te-style neighbor (peer)",
- area->area_tag, sysid_print(ne_id),
- LSP_PSEUDO_ID(ne_id));
+ "ISIS (%s): Adding %pPN as te-style neighbor (peer)",
+ area->area_tag, ne_id);
}
}
list_delete(&adj_list);
@@ -1832,10 +1895,9 @@ int lsp_generate_pseudo(struct isis_circuit *circuit, int level)
if (IS_DEBUG_UPDATE_PACKETS) {
zlog_debug(
- "ISIS-Upd (%s): Built L%d Pseudo LSP %s, len %hu, seq 0x%08x, cksum 0x%04hx, lifetime %hus, refresh %hus",
- circuit->area->area_tag, level,
- rawlspid_print(lsp->hdr.lsp_id), lsp->hdr.pdu_len,
- lsp->hdr.seqno, lsp->hdr.checksum,
+ "ISIS-Upd (%s): Built L%d Pseudo LSP %pLS, len %hu, seq 0x%08x, cksum 0x%04hx, lifetime %hus, refresh %hus",
+ circuit->area->area_tag, level, lsp->hdr.lsp_id,
+ lsp->hdr.pdu_len, lsp->hdr.seqno, lsp->hdr.checksum,
lsp->hdr.rem_lifetime, refresh_time);
}
@@ -1863,8 +1925,8 @@ static int lsp_regenerate_pseudo(struct isis_circuit *circuit, int level)
if (!lsp) {
flog_err(EC_LIB_DEVELOPMENT,
- "lsp_regenerate_pseudo: no l%d LSP %s found!", level,
- rawlspid_print(lsp_id));
+ "lsp_regenerate_pseudo: no l%d LSP %pLS found!", level,
+ lsp_id);
return ISIS_ERROR;
}
@@ -1887,10 +1949,9 @@ static int lsp_regenerate_pseudo(struct isis_circuit *circuit, int level)
if (IS_DEBUG_UPDATE_PACKETS) {
zlog_debug(
- "ISIS-Upd (%s): Refreshed L%d Pseudo LSP %s, len %hu, seq 0x%08x, cksum 0x%04hx, lifetime %hus, refresh %hus",
- circuit->area->area_tag, level,
- rawlspid_print(lsp->hdr.lsp_id), lsp->hdr.pdu_len,
- lsp->hdr.seqno, lsp->hdr.checksum,
+ "ISIS-Upd (%s): Refreshed L%d Pseudo LSP %pLS, len %hu, seq 0x%08x, cksum 0x%04hx, lifetime %hus, refresh %hus",
+ circuit->area->area_tag, level, lsp->hdr.lsp_id,
+ lsp->hdr.pdu_len, lsp->hdr.seqno, lsp->hdr.checksum,
lsp->hdr.rem_lifetime, refresh_time);
}
@@ -2101,10 +2162,9 @@ void lsp_tick(struct event *thread)
if (lsp->age_out == 0) {
zlog_debug(
- "ISIS-Upd (%s): L%u LSP %s seq 0x%08x aged out",
+ "ISIS-Upd (%s): L%u LSP %pLS seq 0x%08x aged out",
area->area_tag, lsp->level,
- rawlspid_print(lsp->hdr.lsp_id),
- lsp->hdr.seqno);
+ lsp->hdr.lsp_id, lsp->hdr.seqno);
/* if we're aging out fragment 0, lsp_destroy()
* below will delete all other fragments too,
@@ -2207,11 +2267,10 @@ void _lsp_flood(struct isis_lsp *lsp, struct isis_circuit *circuit,
const char *func, const char *file, int line)
{
if (IS_DEBUG_FLOODING) {
- zlog_debug("Flooding LSP %s%s%s (From %s %s:%d)",
- rawlspid_print(lsp->hdr.lsp_id),
- circuit ? " except on " : "",
- circuit ? circuit->interface->name : "",
- func, file, line);
+ zlog_debug("Flooding LSP %pLS%s%s (From %s %s:%d)",
+ lsp->hdr.lsp_id, circuit ? " except on " : "",
+ circuit ? circuit->interface->name : "", func, file,
+ line);
}
if (!fabricd)