mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-02 13:23:44 +00:00
*: remove PRI[udx](8|16|32)
These are completely pointless and break coccinelle string replacements. Scripted commit, idempotent to running: ``` python3 tools/stringmangle.py --pri8-16-32 `git ls-files | egrep '\.[ch]$'` ``` Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
parent
3efd0893d0
commit
6cde4b4552
@ -924,8 +924,7 @@ int ptm_bfd_sess_del(struct bfd_peer_cfg *bpc)
|
||||
|
||||
/* This pointer is being referenced, don't let it be deleted. */
|
||||
if (bs->refcount > 0) {
|
||||
zlog_err("session-delete: refcount failure: %" PRIu64
|
||||
" references",
|
||||
zlog_err("session-delete: refcount failure: %" PRIu64" references",
|
||||
bs->refcount);
|
||||
return -1;
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ void bfd_cli_show_rx(struct vty *vty, struct lyd_node *dnode,
|
||||
BFD_DEFREQUIREDMINRX);
|
||||
else {
|
||||
value = yang_dnode_get_uint32(dnode, NULL);
|
||||
vty_out(vty, " receive-interval %" PRIu32 "\n", value / 1000);
|
||||
vty_out(vty, " receive-interval %u\n", value / 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@ -341,7 +341,7 @@ void bfd_cli_show_tx(struct vty *vty, struct lyd_node *dnode,
|
||||
BFD_DEFDESIREDMINTX);
|
||||
else {
|
||||
value = yang_dnode_get_uint32(dnode, NULL);
|
||||
vty_out(vty, " transmit-interval %" PRIu32 "\n", value / 1000);
|
||||
vty_out(vty, " transmit-interval %u\n", value / 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@ -391,7 +391,7 @@ void bfd_cli_show_echo_interval(struct vty *vty, struct lyd_node *dnode,
|
||||
BFD_DEF_REQ_MIN_ECHO);
|
||||
else {
|
||||
value = yang_dnode_get_uint32(dnode, NULL);
|
||||
vty_out(vty, " echo-interval %" PRIu32 "\n", value / 1000);
|
||||
vty_out(vty, " echo-interval %u\n", value / 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,23 +146,23 @@ static void _display_peer(struct vty *vty, struct bfd_session *bs)
|
||||
CHECK_FLAG(bs->flags, BFD_SESS_FLAG_CONFIG) ? "configured" : "dynamic");
|
||||
|
||||
vty_out(vty, "\t\tLocal timers:\n");
|
||||
vty_out(vty, "\t\t\tDetect-multiplier: %" PRIu32 "\n",
|
||||
vty_out(vty, "\t\t\tDetect-multiplier: %u\n",
|
||||
bs->detect_mult);
|
||||
vty_out(vty, "\t\t\tReceive interval: %" PRIu32 "ms\n",
|
||||
vty_out(vty, "\t\t\tReceive interval: %ums\n",
|
||||
bs->timers.required_min_rx / 1000);
|
||||
vty_out(vty, "\t\t\tTransmission interval: %" PRIu32 "ms\n",
|
||||
vty_out(vty, "\t\t\tTransmission interval: %ums\n",
|
||||
bs->timers.desired_min_tx / 1000);
|
||||
vty_out(vty, "\t\t\tEcho transmission interval: %" PRIu32 "ms\n",
|
||||
vty_out(vty, "\t\t\tEcho transmission interval: %ums\n",
|
||||
bs->timers.required_min_echo / 1000);
|
||||
|
||||
vty_out(vty, "\t\tRemote timers:\n");
|
||||
vty_out(vty, "\t\t\tDetect-multiplier: %" PRIu32 "\n",
|
||||
vty_out(vty, "\t\t\tDetect-multiplier: %u\n",
|
||||
bs->remote_detect_mult);
|
||||
vty_out(vty, "\t\t\tReceive interval: %" PRIu32 "ms\n",
|
||||
vty_out(vty, "\t\t\tReceive interval: %ums\n",
|
||||
bs->remote_timers.required_min_rx / 1000);
|
||||
vty_out(vty, "\t\t\tTransmission interval: %" PRIu32 "ms\n",
|
||||
vty_out(vty, "\t\t\tTransmission interval: %ums\n",
|
||||
bs->remote_timers.desired_min_tx / 1000);
|
||||
vty_out(vty, "\t\t\tEcho transmission interval: %" PRIu32 "ms\n",
|
||||
vty_out(vty, "\t\t\tEcho transmission interval: %ums\n",
|
||||
bs->remote_timers.required_min_echo / 1000);
|
||||
|
||||
vty_out(vty, "\n");
|
||||
|
@ -765,8 +765,7 @@ static void attr_show_all_iterator(struct hash_bucket *bucket, struct vty *vty)
|
||||
inet_ntop(AF_INET6, &attr->srv6_vpn->sid, sid_str, BUFSIZ);
|
||||
|
||||
vty_out(vty,
|
||||
"\tflags: %" PRIu64
|
||||
" med: %u local_pref: %u origin: %u weight: %u label: %u sid: %s\n",
|
||||
"\tflags: %" PRIu64" med: %u local_pref: %u origin: %u weight: %u label: %u sid: %s\n",
|
||||
attr->flag, attr->med, attr->local_pref, attr->origin,
|
||||
attr->weight, attr->label, sid_str);
|
||||
}
|
||||
@ -2399,8 +2398,7 @@ static bgp_attr_parse_ret_t bgp_attr_psid_sub(uint8_t type, uint16_t length,
|
||||
if (STREAM_READABLE(peer->curr) < length
|
||||
|| length != BGP_PREFIX_SID_LABEL_INDEX_LENGTH) {
|
||||
flog_err(EC_BGP_ATTR_LEN,
|
||||
"Prefix SID label index length is %" PRIu16
|
||||
" instead of %u",
|
||||
"Prefix SID label index length is %hu instead of %u",
|
||||
length, BGP_PREFIX_SID_LABEL_INDEX_LENGTH);
|
||||
return bgp_attr_malformed(args,
|
||||
BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
|
||||
@ -2427,8 +2425,7 @@ static bgp_attr_parse_ret_t bgp_attr_psid_sub(uint8_t type, uint16_t length,
|
||||
if (STREAM_READABLE(peer->curr) < length
|
||||
|| length != BGP_PREFIX_SID_IPV6_LENGTH) {
|
||||
flog_err(EC_BGP_ATTR_LEN,
|
||||
"Prefix SID IPv6 length is %" PRIu16
|
||||
" instead of %u",
|
||||
"Prefix SID IPv6 length is %hu instead of %u",
|
||||
length, BGP_PREFIX_SID_IPV6_LENGTH);
|
||||
return bgp_attr_malformed(args,
|
||||
BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
|
||||
@ -2460,7 +2457,7 @@ static bgp_attr_parse_ret_t bgp_attr_psid_sub(uint8_t type, uint16_t length,
|
||||
if (length < (2 + BGP_PREFIX_SID_ORIGINATOR_SRGB_LENGTH)) {
|
||||
flog_err(
|
||||
EC_BGP_ATTR_LEN,
|
||||
"Prefix SID Originator SRGB length field claims length of %" PRIu16 " bytes, but the minimum for this TLV type is %u",
|
||||
"Prefix SID Originator SRGB length field claims length of %hu bytes, but the minimum for this TLV type is %u",
|
||||
length,
|
||||
2 + BGP_PREFIX_SID_ORIGINATOR_SRGB_LENGTH);
|
||||
return bgp_attr_malformed(
|
||||
@ -2474,7 +2471,7 @@ static bgp_attr_parse_ret_t bgp_attr_psid_sub(uint8_t type, uint16_t length,
|
||||
*/
|
||||
if (STREAM_READABLE(peer->curr) < length) {
|
||||
flog_err(EC_BGP_ATTR_LEN,
|
||||
"Prefix SID Originator SRGB specifies length %" PRIu16 ", but only %zu bytes remain",
|
||||
"Prefix SID Originator SRGB specifies length %hu, but only %zu bytes remain",
|
||||
length, STREAM_READABLE(peer->curr));
|
||||
return bgp_attr_malformed(
|
||||
args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
|
||||
@ -2491,7 +2488,7 @@ static bgp_attr_parse_ret_t bgp_attr_psid_sub(uint8_t type, uint16_t length,
|
||||
if (length % BGP_PREFIX_SID_ORIGINATOR_SRGB_LENGTH) {
|
||||
flog_err(
|
||||
EC_BGP_ATTR_LEN,
|
||||
"Prefix SID Originator SRGB length field claims attribute SRGB sequence section is %" PRIu16 "bytes, but it must be a multiple of %u",
|
||||
"Prefix SID Originator SRGB length field claims attribute SRGB sequence section is %hubytes, but it must be a multiple of %u",
|
||||
length, BGP_PREFIX_SID_ORIGINATOR_SRGB_LENGTH);
|
||||
return bgp_attr_malformed(
|
||||
args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
|
||||
@ -2511,8 +2508,7 @@ static bgp_attr_parse_ret_t bgp_attr_psid_sub(uint8_t type, uint16_t length,
|
||||
if (STREAM_READABLE(peer->curr) < length
|
||||
|| length != BGP_PREFIX_SID_VPN_SID_LENGTH) {
|
||||
flog_err(EC_BGP_ATTR_LEN,
|
||||
"Prefix SID VPN SID length is %" PRIu16
|
||||
" instead of %u",
|
||||
"Prefix SID VPN SID length is %hu instead of %u",
|
||||
length, BGP_PREFIX_SID_VPN_SID_LENGTH);
|
||||
return bgp_attr_malformed(args,
|
||||
BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
|
||||
@ -2552,8 +2548,7 @@ static bgp_attr_parse_ret_t bgp_attr_psid_sub(uint8_t type, uint16_t length,
|
||||
if (STREAM_READABLE(peer->curr) < length
|
||||
|| length != BGP_PREFIX_SID_SRV6_L3_SERVICE_LENGTH) {
|
||||
flog_err(EC_BGP_ATTR_LEN,
|
||||
"Prefix SID SRv6 L3-Service length is %" PRIu16
|
||||
" instead of %u",
|
||||
"Prefix SID SRv6 L3-Service length is %hu instead of %u",
|
||||
length, BGP_PREFIX_SID_SRV6_L3_SERVICE_LENGTH);
|
||||
return bgp_attr_malformed(args,
|
||||
BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
|
||||
@ -2596,8 +2591,7 @@ static bgp_attr_parse_ret_t bgp_attr_psid_sub(uint8_t type, uint16_t length,
|
||||
if (STREAM_READABLE(peer->curr) < length) {
|
||||
flog_err(
|
||||
EC_BGP_ATTR_LEN,
|
||||
"Prefix SID SRv6 length is %" PRIu16
|
||||
" - too long, only %zu remaining in this UPDATE",
|
||||
"Prefix SID SRv6 length is %hu - too long, only %zu remaining in this UPDATE",
|
||||
length, STREAM_READABLE(peer->curr));
|
||||
return bgp_attr_malformed(
|
||||
args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
|
||||
@ -2650,8 +2644,7 @@ bgp_attr_parse_ret_t bgp_attr_prefix_sid(struct bgp_attr_parser_args *args)
|
||||
if (STREAM_READABLE(peer->curr) < length) {
|
||||
flog_err(
|
||||
EC_BGP_ATTR_LEN,
|
||||
"Malformed Prefix SID attribute - insufficient data (need %" PRIu16
|
||||
" for attribute body, have %zu remaining in UPDATE)",
|
||||
"Malformed Prefix SID attribute - insufficient data (need %hu for attribute body, have %zu remaining in UPDATE)",
|
||||
length, STREAM_READABLE(peer->curr));
|
||||
return bgp_attr_malformed(args,
|
||||
BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
|
||||
|
@ -174,15 +174,15 @@ char *prefix_rd2str(const struct prefix_rd *prd, char *buf, size_t size)
|
||||
|
||||
if (type == RD_TYPE_AS) {
|
||||
decode_rd_as(pnt + 2, &rd_as);
|
||||
snprintf(buf, size, "%u:%" PRIu32, rd_as.as, rd_as.val);
|
||||
snprintf(buf, size, "%u:%u", rd_as.as, rd_as.val);
|
||||
return buf;
|
||||
} else if (type == RD_TYPE_AS4) {
|
||||
decode_rd_as4(pnt + 2, &rd_as);
|
||||
snprintf(buf, size, "%u:%" PRIu32, rd_as.as, rd_as.val);
|
||||
snprintf(buf, size, "%u:%u", rd_as.as, rd_as.val);
|
||||
return buf;
|
||||
} else if (type == RD_TYPE_IP) {
|
||||
decode_rd_ip(pnt + 2, &rd_ip);
|
||||
snprintf(buf, size, "%s:%" PRIu16, inet_ntoa(rd_ip.ip),
|
||||
snprintf(buf, size, "%s:%hu", inet_ntoa(rd_ip.ip),
|
||||
rd_ip.val);
|
||||
return buf;
|
||||
}
|
||||
|
@ -1644,8 +1644,7 @@ bool subgroup_announce_check(struct bgp_dest *dest, struct bgp_path_info *pi,
|
||||
mpls_label_t label = bgp_adv_label(dest, pi, peer, afi, safi);
|
||||
if (!bgp_is_valid_label(&label)) {
|
||||
if (bgp_debug_update(NULL, p, subgrp->update_group, 0))
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64
|
||||
" %s/%d is filtered - no label (%p)",
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64" %s/%d is filtered - no label (%p)",
|
||||
subgrp->update_group->id, subgrp->id,
|
||||
inet_ntop(p->family, &p->u.prefix,
|
||||
buf, SU_ADDRSTRLEN),
|
||||
@ -2991,8 +2990,7 @@ bool bgp_maximum_prefix_overflow(struct peer *peer, afi_t afi, safi_t safi,
|
||||
return false;
|
||||
|
||||
zlog_info(
|
||||
"%%MAXPFXEXCEED: No. of %s prefix received from %s %" PRIu32
|
||||
" exceed, limit %" PRIu32,
|
||||
"%%MAXPFXEXCEED: No. of %s prefix received from %s %u exceed, limit %u",
|
||||
get_afi_safi_str(afi, safi, false), peer->host,
|
||||
peer->pcount[afi][safi], peer->pmax[afi][safi]);
|
||||
SET_FLAG(peer->af_sflags[afi][safi], PEER_STATUS_PREFIX_LIMIT);
|
||||
@ -3053,8 +3051,7 @@ bool bgp_maximum_prefix_overflow(struct peer *peer, afi_t afi, safi_t safi,
|
||||
return false;
|
||||
|
||||
zlog_info(
|
||||
"%%MAXPFX: No. of %s prefix received from %s reaches %" PRIu32
|
||||
", max %" PRIu32,
|
||||
"%%MAXPFX: No. of %s prefix received from %s reaches %u, max %u",
|
||||
get_afi_safi_str(afi, safi, false), peer->host,
|
||||
peer->pcount[afi][safi], peer->pmax[afi][safi]);
|
||||
SET_FLAG(peer->af_sflags[afi][safi],
|
||||
@ -9604,8 +9601,7 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi,
|
||||
|
||||
if (use_json && !*json_header_depth) {
|
||||
vty_out(vty,
|
||||
"{\n \"vrfId\": %d,\n \"vrfName\": \"%s\",\n \"tableVersion\": %" PRId64
|
||||
",\n \"routerId\": \"%s\",\n \"defaultLocPrf\": %u,\n"
|
||||
"{\n \"vrfId\": %d,\n \"vrfName\": \"%s\",\n \"tableVersion\": %" PRId64",\n \"routerId\": \"%s\",\n \"defaultLocPrf\": %u,\n"
|
||||
" \"localAS\": %u,\n \"routes\": { ",
|
||||
bgp->vrf_id == VRF_UNKNOWN ? -1 : (int)bgp->vrf_id,
|
||||
bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT
|
||||
@ -9790,8 +9786,7 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi,
|
||||
}
|
||||
|
||||
if (!use_json && header) {
|
||||
vty_out(vty, "BGP table version is %" PRIu64
|
||||
", local router ID is %s, vrf id ",
|
||||
vty_out(vty, "BGP table version is %" PRIu64", local router ID is %s, vrf id ",
|
||||
table->version,
|
||||
inet_ntoa(bgp->router_id));
|
||||
if (bgp->vrf_id == VRF_UNKNOWN)
|
||||
@ -11786,7 +11781,7 @@ static int bgp_peer_counts(struct vty *vty, struct peer *peer, afi_t afi,
|
||||
get_afi_safi_str(afi, safi, false));
|
||||
}
|
||||
|
||||
vty_out(vty, "PfxCt: %" PRIu32 "\n", peer->pcount[afi][safi]);
|
||||
vty_out(vty, "PfxCt: %u\n", peer->pcount[afi][safi]);
|
||||
vty_out(vty, "\nCounts from RIB table walk:\n\n");
|
||||
|
||||
for (i = 0; i < PCOUNT_MAX; i++)
|
||||
@ -12019,8 +12014,7 @@ static void show_adj_route(struct vty *vty, struct peer *peer, afi_t afi,
|
||||
json, "bgpOriginatingDefaultNetwork",
|
||||
(afi == AFI_IP) ? "0.0.0.0/0" : "::/0");
|
||||
} else {
|
||||
vty_out(vty, "BGP table version is %" PRIu64
|
||||
", local router ID is %s, vrf id ",
|
||||
vty_out(vty, "BGP table version is %" PRIu64", local router ID is %s, vrf id ",
|
||||
table->version, inet_ntoa(bgp->router_id));
|
||||
if (bgp->vrf_id == VRF_UNKNOWN)
|
||||
vty_out(vty, "%s", VRFID_NONE_STR);
|
||||
@ -12167,8 +12161,7 @@ static void show_adj_route(struct vty *vty, struct peer *peer, afi_t afi,
|
||||
json_ocode);
|
||||
} else {
|
||||
vty_out(vty,
|
||||
"BGP table version is %" PRIu64
|
||||
", local router ID is %s, vrf id ",
|
||||
"BGP table version is %" PRIu64", local router ID is %s, vrf id ",
|
||||
table->version,
|
||||
inet_ntoa(
|
||||
bgp->router_id));
|
||||
|
@ -1075,9 +1075,7 @@ static void update_subgroup_merge(struct update_subgroup *subgrp,
|
||||
SUBGRP_INCR_STAT(target, merge_events);
|
||||
|
||||
if (BGP_DEBUG(update_groups, UPDATE_GROUPS))
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64
|
||||
" (%d peers) merged into u%" PRIu64 ":s%" PRIu64
|
||||
", trigger: %s",
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64" (%d peers) merged into u%" PRIu64 ":s%" PRIu64", trigger: %s",
|
||||
subgrp->update_group->id, subgrp->id, peer_count,
|
||||
target->update_group->id, target->id,
|
||||
reason ? reason : "unknown");
|
||||
@ -1367,8 +1365,7 @@ static int updgrp_policy_update_walkcb(struct update_group *updgrp, void *arg)
|
||||
if (changed) {
|
||||
if (bgp_debug_update(NULL, NULL, updgrp, 0))
|
||||
zlog_debug(
|
||||
"u%" PRIu64 ":s%" PRIu64
|
||||
" announcing routes upon policy %s (type %d) change",
|
||||
"u%" PRIu64 ":s%" PRIu64" announcing routes upon policy %s (type %d) change",
|
||||
updgrp->id, subgrp->id,
|
||||
ctx->policy_name, ctx->policy_type);
|
||||
subgroup_announce_route(subgrp);
|
||||
@ -1376,8 +1373,7 @@ static int updgrp_policy_update_walkcb(struct update_group *updgrp, void *arg)
|
||||
if (def_changed) {
|
||||
if (bgp_debug_update(NULL, NULL, updgrp, 0))
|
||||
zlog_debug(
|
||||
"u%" PRIu64 ":s%" PRIu64
|
||||
" announcing default upon default routemap %s change",
|
||||
"u%" PRIu64 ":s%" PRIu64" announcing default upon default routemap %s change",
|
||||
updgrp->id, subgrp->id,
|
||||
ctx->policy_name);
|
||||
subgroup_default_originate(subgrp, 0);
|
||||
@ -1483,8 +1479,7 @@ void update_subgroup_split_peer(struct peer_af *paf,
|
||||
UPDGRP_PEER_DBG_EN(updgrp);
|
||||
}
|
||||
if (BGP_DEBUG(update_groups, UPDATE_GROUPS))
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64
|
||||
" peer %s moved to u%" PRIu64 ":s%" PRIu64,
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64" peer %s moved to u%" PRIu64 ":s%" PRIu64,
|
||||
old_id, subgrp->id, paf->peer->host,
|
||||
updgrp->id, subgrp->id);
|
||||
|
||||
@ -1518,9 +1513,7 @@ void update_subgroup_split_peer(struct peer_af *paf,
|
||||
update_subgroup_copy_packets(subgrp, paf->next_pkt_to_send);
|
||||
|
||||
if (BGP_DEBUG(update_groups, UPDATE_GROUPS))
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64
|
||||
" peer %s split and moved into u%" PRIu64
|
||||
":s%" PRIu64,
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64" peer %s split and moved into u%" PRIu64":s%" PRIu64,
|
||||
paf->subgroup->update_group->id, paf->subgroup->id,
|
||||
paf->peer->host, updgrp->id, subgrp->id);
|
||||
|
||||
@ -1836,8 +1829,7 @@ void peer_af_announce_route(struct peer_af *paf, int combine)
|
||||
|
||||
assert(subgrp && subgrp->update_group);
|
||||
if (bgp_debug_update(paf->peer, NULL, subgrp->update_group, 0))
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64
|
||||
" %s announcing routes",
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64" %s announcing routes",
|
||||
subgrp->update_group->id, subgrp->id,
|
||||
paf->peer->host);
|
||||
|
||||
@ -1858,8 +1850,7 @@ void peer_af_announce_route(struct peer_af *paf, int combine)
|
||||
}
|
||||
|
||||
if (bgp_debug_update(paf->peer, NULL, subgrp->update_group, 0))
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64
|
||||
" announcing routes to %s, combined into %d peers",
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64" announcing routes to %s, combined into %d peers",
|
||||
subgrp->update_group->id, subgrp->id,
|
||||
paf->peer->host, subgrp->peer_count);
|
||||
|
||||
|
@ -246,8 +246,7 @@ static void subgrp_show_adjq_vty(struct update_subgroup *subgrp,
|
||||
if (adj->subgroup == subgrp) {
|
||||
if (header1) {
|
||||
vty_out(vty,
|
||||
"BGP table version is %" PRIu64
|
||||
", local router ID is %s\n",
|
||||
"BGP table version is %" PRIu64", local router ID is %s\n",
|
||||
table->version,
|
||||
inet_ntoa(bgp->router_id));
|
||||
vty_out(vty, BGP_SHOW_SCODE_HEADER);
|
||||
@ -314,8 +313,7 @@ static int subgroup_coalesce_timer(struct thread *thread)
|
||||
|
||||
subgrp = THREAD_ARG(thread);
|
||||
if (bgp_debug_update(NULL, NULL, subgrp->update_group, 0))
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64
|
||||
" announcing routes upon coalesce timer expiry(%u ms)",
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64" announcing routes upon coalesce timer expiry(%u ms)",
|
||||
(SUBGRP_UPDGRP(subgrp))->id, subgrp->id,
|
||||
subgrp->v_coalesce);
|
||||
subgrp->t_coalesce = NULL;
|
||||
@ -896,8 +894,7 @@ void subgroup_announce_all(struct update_subgroup *subgrp)
|
||||
*/
|
||||
if (!subgrp->v_coalesce) {
|
||||
if (bgp_debug_update(NULL, NULL, subgrp->update_group, 0))
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64
|
||||
" announcing all routes",
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64" announcing all routes",
|
||||
subgrp->update_group->id, subgrp->id);
|
||||
subgroup_announce_route(subgrp);
|
||||
return;
|
||||
|
@ -488,8 +488,7 @@ struct stream *bpacket_reformat_for_peer(struct bpacket *pkt,
|
||||
stream_put_in_addr_at(s, offset_nh, mod_v4nh);
|
||||
|
||||
if (bgp_debug_update(peer, NULL, NULL, 0))
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64
|
||||
" %s send UPDATE w/ nexthop %s%s",
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64" %s send UPDATE w/ nexthop %s%s",
|
||||
PAF_SUBGRP(paf)->update_group->id,
|
||||
PAF_SUBGRP(paf)->id, peer->host,
|
||||
inet_ntoa(*mod_v4nh),
|
||||
@ -594,8 +593,7 @@ struct stream *bpacket_reformat_for_peer(struct bpacket *pkt,
|
||||
if (nhlen == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL
|
||||
|| nhlen == BGP_ATTR_NHLEN_VPNV6_GLOBAL_AND_LL)
|
||||
zlog_debug(
|
||||
"u%" PRIu64 ":s%" PRIu64
|
||||
" %s send UPDATE w/ mp_nexthops %s, %s%s",
|
||||
"u%" PRIu64 ":s%" PRIu64" %s send UPDATE w/ mp_nexthops %s, %s%s",
|
||||
PAF_SUBGRP(paf)->update_group->id,
|
||||
PAF_SUBGRP(paf)->id, peer->host,
|
||||
inet_ntop(AF_INET6, mod_v6nhg, buf,
|
||||
@ -606,8 +604,7 @@ struct stream *bpacket_reformat_for_peer(struct bpacket *pkt,
|
||||
? " and RD"
|
||||
: ""));
|
||||
else
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64
|
||||
" %s send UPDATE w/ mp_nexthop %s%s",
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64" %s send UPDATE w/ mp_nexthop %s%s",
|
||||
PAF_SUBGRP(paf)->update_group->id,
|
||||
PAF_SUBGRP(paf)->id, peer->host,
|
||||
inet_ntop(AF_INET6, mod_v6nhg, buf,
|
||||
@ -633,8 +630,7 @@ struct stream *bpacket_reformat_for_peer(struct bpacket *pkt,
|
||||
stream_put_in_addr_at(s, vec->offset + 1, mod_v4nh);
|
||||
|
||||
if (bgp_debug_update(peer, NULL, NULL, 0))
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64
|
||||
" %s send UPDATE w/ nexthop %s",
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64" %s send UPDATE w/ nexthop %s",
|
||||
PAF_SUBGRP(paf)->update_group->id,
|
||||
PAF_SUBGRP(paf)->id, peer->host,
|
||||
inet_ntoa(*mod_v4nh));
|
||||
@ -750,8 +746,7 @@ struct bpacket *subgroup_update_packet(struct update_subgroup *subgrp)
|
||||
if (BGP_DEBUG(update, UPDATE_OUT)
|
||||
|| BGP_DEBUG(update, UPDATE_PREFIX)) {
|
||||
zlog_debug(
|
||||
"%s reached maximum prefix to be send (%" PRIu32
|
||||
")",
|
||||
"%s reached maximum prefix to be send (%u)",
|
||||
peer->host, peer->pmax_out[afi][safi]);
|
||||
}
|
||||
goto next;
|
||||
@ -815,8 +810,7 @@ struct bpacket *subgroup_update_packet(struct update_subgroup *subgrp)
|
||||
if (space_remaining < space_needed) {
|
||||
flog_err(
|
||||
EC_BGP_UPDGRP_ATTR_LEN,
|
||||
"u%" PRIu64 ":s%" PRIu64
|
||||
" attributes too long, cannot send UPDATE",
|
||||
"u%" PRIu64 ":s%" PRIu64" attributes too long, cannot send UPDATE",
|
||||
subgrp->update_group->id, subgrp->id);
|
||||
|
||||
/* Flush the FIFO update queue */
|
||||
@ -872,8 +866,7 @@ struct bpacket *subgroup_update_packet(struct update_subgroup *subgrp)
|
||||
char pfx_buf[BGP_PRD_PATH_STRLEN];
|
||||
|
||||
if (!send_attr_printed) {
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64
|
||||
" send UPDATE w/ attr: %s",
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64" send UPDATE w/ attr: %s",
|
||||
subgrp->update_group->id, subgrp->id,
|
||||
send_attr_str);
|
||||
if (!stream_empty(snlri)) {
|
||||
@ -883,8 +876,7 @@ struct bpacket *subgroup_update_packet(struct update_subgroup *subgrp)
|
||||
pkt_afi = afi_int2iana(afi);
|
||||
pkt_safi = safi_int2iana(safi);
|
||||
zlog_debug(
|
||||
"u%" PRIu64 ":s%" PRIu64
|
||||
" send MP_REACH for afi/safi %d/%d",
|
||||
"u%" PRIu64 ":s%" PRIu64" send MP_REACH for afi/safi %d/%d",
|
||||
subgrp->update_group->id,
|
||||
subgrp->id, pkt_afi, pkt_safi);
|
||||
}
|
||||
@ -928,8 +920,7 @@ next:
|
||||
packet = stream_dup(s);
|
||||
bgp_packet_set_size(packet);
|
||||
if (bgp_debug_update(NULL, NULL, subgrp->update_group, 0))
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64
|
||||
" send UPDATE len %zd numpfx %d",
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64" send UPDATE len %zd numpfx %d",
|
||||
subgrp->update_group->id, subgrp->id,
|
||||
(stream_get_endp(packet)
|
||||
- stream_get_getp(packet)),
|
||||
@ -1043,8 +1034,7 @@ struct bpacket *subgroup_withdraw_packet(struct update_subgroup *subgrp)
|
||||
if (bgp_debug_update(NULL, NULL,
|
||||
subgrp->update_group, 0))
|
||||
zlog_debug(
|
||||
"u%" PRIu64 ":s%" PRIu64
|
||||
" send MP_UNREACH for afi/safi %d/%d",
|
||||
"u%" PRIu64 ":s%" PRIu64" send MP_UNREACH for afi/safi %d/%d",
|
||||
subgrp->update_group->id,
|
||||
subgrp->id, pkt_afi, pkt_safi);
|
||||
}
|
||||
@ -1062,8 +1052,7 @@ struct bpacket *subgroup_withdraw_packet(struct update_subgroup *subgrp)
|
||||
bgp_debug_rdpfxpath2str(afi, safi, prd, dest_p, NULL, 0,
|
||||
addpath_encode, addpath_tx_id,
|
||||
pfx_buf, sizeof(pfx_buf));
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64
|
||||
" send UPDATE %s -- unreachable",
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64" send UPDATE %s -- unreachable",
|
||||
subgrp->update_group->id, subgrp->id,
|
||||
pfx_buf);
|
||||
}
|
||||
@ -1091,8 +1080,7 @@ struct bpacket *subgroup_withdraw_packet(struct update_subgroup *subgrp)
|
||||
}
|
||||
bgp_packet_set_size(s);
|
||||
if (bgp_debug_update(NULL, NULL, subgrp->update_group, 0))
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64
|
||||
" send UPDATE (withdraw) len %zd numpfx %d",
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64" send UPDATE (withdraw) len %zd numpfx %d",
|
||||
subgrp->update_group->id, subgrp->id,
|
||||
(stream_get_endp(s) - stream_get_getp(s)),
|
||||
num_pfx);
|
||||
@ -1235,8 +1223,7 @@ void subgroup_default_withdraw_packet(struct update_subgroup *subgrp)
|
||||
" with addpath ID %u",
|
||||
BGP_ADDPATH_TX_ID_FOR_DEFAULT_ORIGINATE);
|
||||
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64
|
||||
" send UPDATE %s%s -- unreachable",
|
||||
zlog_debug("u%" PRIu64 ":s%" PRIu64" send UPDATE %s%s -- unreachable",
|
||||
(SUBGRP_UPDGRP(subgrp))->id, subgrp->id,
|
||||
prefix2str(&p, buf, sizeof(buf)), tx_id_buf);
|
||||
}
|
||||
|
@ -9351,8 +9351,7 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
|
||||
memory_order_relaxed);
|
||||
|
||||
vty_out(vty,
|
||||
"4 %10u %9u %9u %8" PRIu64
|
||||
" %4zu %4zu %8s",
|
||||
"4 %10u %9u %9u %8" PRIu64" %4zu %4zu %8s",
|
||||
peer->as, PEER_TOTAL_RX(peer),
|
||||
PEER_TOTAL_TX(peer),
|
||||
peer->version[afi][safi], inq_count,
|
||||
@ -9371,7 +9370,7 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
|
||||
"(Policy)");
|
||||
else
|
||||
vty_out(vty,
|
||||
" %12" PRIu32,
|
||||
" %12u",
|
||||
peer->pcount
|
||||
[afi]
|
||||
[pfx_rcd_safi]);
|
||||
@ -9389,7 +9388,7 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
|
||||
"(Policy)");
|
||||
else
|
||||
vty_out(vty,
|
||||
" %8" PRIu32,
|
||||
" %8u",
|
||||
(PAF_SUBGRP(
|
||||
paf))
|
||||
->scount);
|
||||
@ -9406,7 +9405,7 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
|
||||
lookup_msg(bgp_status_msg,
|
||||
peer->status, NULL));
|
||||
|
||||
vty_out(vty, " %8" PRIu32, 0);
|
||||
vty_out(vty, " %8u", 0);
|
||||
}
|
||||
vty_out(vty, "\n");
|
||||
}
|
||||
@ -10429,8 +10428,7 @@ static void bgp_show_peer_afi(struct vty *vty, struct peer *p, afi_t afi,
|
||||
|
||||
paf = peer_af_find(p, afi, safi);
|
||||
if (paf && PAF_SUBGRP(paf)) {
|
||||
vty_out(vty, " Update group %" PRIu64
|
||||
", subgroup %" PRIu64 "\n",
|
||||
vty_out(vty, " Update group %" PRIu64", subgroup %" PRIu64 "\n",
|
||||
PAF_UPDGRP(paf)->id, PAF_SUBGRP(paf)->id);
|
||||
vty_out(vty, " Packet Queue length %d\n",
|
||||
bpacket_queue_virtual_length(paf));
|
||||
@ -10681,20 +10679,20 @@ static void bgp_show_peer_afi(struct vty *vty, struct peer *p, afi_t afi,
|
||||
filter->usmap.name);
|
||||
|
||||
/* Receive prefix count */
|
||||
vty_out(vty, " %" PRIu32 " accepted prefixes\n",
|
||||
vty_out(vty, " %u accepted prefixes\n",
|
||||
p->pcount[afi][safi]);
|
||||
|
||||
/* maximum-prefix-out */
|
||||
if (CHECK_FLAG(p->af_flags[afi][safi],
|
||||
PEER_FLAG_MAX_PREFIX_OUT))
|
||||
vty_out(vty,
|
||||
" Maximum allowed prefixes sent %" PRIu32 "\n",
|
||||
" Maximum allowed prefixes sent %u\n",
|
||||
p->pmax_out[afi][safi]);
|
||||
|
||||
/* Maximum prefix */
|
||||
if (CHECK_FLAG(p->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX)) {
|
||||
vty_out(vty,
|
||||
" Maximum prefixes allowed %" PRIu32 "%s\n",
|
||||
" Maximum prefixes allowed %u%s\n",
|
||||
p->pmax[afi][safi],
|
||||
CHECK_FLAG(p->af_flags[afi][safi],
|
||||
PEER_FLAG_MAX_PREFIX_WARNING)
|
||||
@ -13521,10 +13519,10 @@ static int bgp_show_one_peer_group(struct vty *vty, struct peer_group *group)
|
||||
conf = group->conf;
|
||||
|
||||
if (conf->as_type == AS_SPECIFIED || conf->as_type == AS_EXTERNAL) {
|
||||
vty_out(vty, "\nBGP peer-group %s, remote AS %" PRIu32 "\n",
|
||||
vty_out(vty, "\nBGP peer-group %s, remote AS %u\n",
|
||||
group->name, conf->as);
|
||||
} else if (conf->as_type == AS_INTERNAL) {
|
||||
vty_out(vty, "\nBGP peer-group %s, remote AS %" PRIu32 "\n",
|
||||
vty_out(vty, "\nBGP peer-group %s, remote AS %u\n",
|
||||
group->name, group->bgp->as);
|
||||
} else {
|
||||
vty_out(vty, "\nBGP peer-group %s\n", group->name);
|
||||
@ -15043,7 +15041,7 @@ static void bgp_config_write_peer_af(struct vty *vty, struct bgp *bgp,
|
||||
|
||||
/* maximum-prefix. */
|
||||
if (peergroup_af_flag_check(peer, afi, safi, PEER_FLAG_MAX_PREFIX)) {
|
||||
vty_out(vty, " neighbor %s maximum-prefix %" PRIu32, addr,
|
||||
vty_out(vty, " neighbor %s maximum-prefix %u", addr,
|
||||
peer->pmax[afi][safi]);
|
||||
|
||||
if (peer->pmax_threshold[afi][safi]
|
||||
@ -15061,7 +15059,7 @@ static void bgp_config_write_peer_af(struct vty *vty, struct bgp *bgp,
|
||||
|
||||
/* maximum-prefix-out */
|
||||
if (peergroup_af_flag_check(peer, afi, safi, PEER_FLAG_MAX_PREFIX_OUT))
|
||||
vty_out(vty, " neighbor %s maximum-prefix-out %" PRIu32 "\n",
|
||||
vty_out(vty, " neighbor %s maximum-prefix-out %u\n",
|
||||
addr, peer->pmax_out[afi][safi]);
|
||||
|
||||
/* Route server client. */
|
||||
@ -18096,8 +18094,7 @@ static int community_list_config_write(struct vty *vty)
|
||||
for (list = cm->str.head; list; list = list->next)
|
||||
for (entry = list->head; entry; entry = entry->next) {
|
||||
vty_out(vty,
|
||||
"bgp extcommunity-list %s %s seq %" PRId64
|
||||
" %s %s\n",
|
||||
"bgp extcommunity-list %s %s seq %" PRId64" %s %s\n",
|
||||
entry->style == EXTCOMMUNITY_LIST_STANDARD
|
||||
? "standard"
|
||||
: "expanded",
|
||||
@ -18115,8 +18112,7 @@ static int community_list_config_write(struct vty *vty)
|
||||
for (list = cm->num.head; list; list = list->next)
|
||||
for (entry = list->head; entry; entry = entry->next) {
|
||||
vty_out(vty,
|
||||
"bgp large-community-list %s seq %" PRId64
|
||||
" %s %s\n",
|
||||
"bgp large-community-list %s seq %" PRId64" %s %s\n",
|
||||
list->name, entry->seq,
|
||||
community_direct_str(entry->direct),
|
||||
community_list_config_str(entry));
|
||||
@ -18125,8 +18121,7 @@ static int community_list_config_write(struct vty *vty)
|
||||
for (list = cm->str.head; list; list = list->next)
|
||||
for (entry = list->head; entry; entry = entry->next) {
|
||||
vty_out(vty,
|
||||
"bgp large-community-list %s %s seq %" PRId64
|
||||
" %s %s\n",
|
||||
"bgp large-community-list %s %s seq %" PRId64" %s %s\n",
|
||||
|
||||
entry->style == LARGE_COMMUNITY_LIST_STANDARD
|
||||
? "standard"
|
||||
|
@ -372,8 +372,7 @@ static uint8_t fabricd_calculate_fabric_tier(struct isis_area *area)
|
||||
return ISIS_TIER_UNDEFINED;
|
||||
}
|
||||
|
||||
zlog_info("OpenFabric: Found %s as furthest t0 from local system, dist == %"
|
||||
PRIu32, rawlspid_print(furthest_t0->N.id), furthest_t0->d_N);
|
||||
zlog_info("OpenFabric: Found %s as furthest t0 from local system, dist == %u", rawlspid_print(furthest_t0->N.id), furthest_t0->d_N);
|
||||
|
||||
struct isis_spftree *remote_tree =
|
||||
isis_run_hopcount_spf(area, furthest_t0->N.id, NULL);
|
||||
@ -386,8 +385,7 @@ static uint8_t fabricd_calculate_fabric_tier(struct isis_area *area)
|
||||
isis_spftree_del(remote_tree);
|
||||
return ISIS_TIER_UNDEFINED;
|
||||
} else {
|
||||
zlog_info("OpenFabric: Found %s as furthest from remote dist == %"
|
||||
PRIu32, rawlspid_print(furthest_from_remote->N.id),
|
||||
zlog_info("OpenFabric: Found %s as furthest from remote dist == %u", rawlspid_print(furthest_from_remote->N.id),
|
||||
furthest_from_remote->d_N);
|
||||
}
|
||||
|
||||
@ -423,7 +421,7 @@ static int fabricd_tier_calculation_cb(struct thread *thread)
|
||||
if (tier == ISIS_TIER_UNDEFINED)
|
||||
return 0;
|
||||
|
||||
zlog_info("OpenFabric: Got tier %" PRIu8 " from algorithm. Arming timer.",
|
||||
zlog_info("OpenFabric: Got tier %hhu from algorithm. Arming timer.",
|
||||
tier);
|
||||
f->tier_pending = tier;
|
||||
thread_add_timer(master, fabricd_tier_set_timer, f,
|
||||
@ -463,7 +461,7 @@ static void fabricd_set_tier(struct fabricd *f, uint8_t tier)
|
||||
if (f->tier == tier)
|
||||
return;
|
||||
|
||||
zlog_info("OpenFabric: Set own tier to %" PRIu8, tier);
|
||||
zlog_info("OpenFabric: Set own tier to %hhu", tier);
|
||||
f->tier = tier;
|
||||
|
||||
fabricd_bump_tier_calculation_timer(f);
|
||||
@ -522,7 +520,7 @@ int fabricd_write_settings(struct isis_area *area, struct vty *vty)
|
||||
return written;
|
||||
|
||||
if (f->tier_config != ISIS_TIER_UNDEFINED) {
|
||||
vty_out(vty, " fabric-tier %" PRIu8 "\n", f->tier_config);
|
||||
vty_out(vty, " fabric-tier %hhu\n", f->tier_config);
|
||||
written++;
|
||||
}
|
||||
|
||||
|
@ -200,16 +200,12 @@ 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%08" PRIx32
|
||||
", cksum 0x%04" PRIx16 ", lifetime %" PRIu16
|
||||
"s",
|
||||
"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);
|
||||
zlog_debug(
|
||||
"ISIS-Snp (%s): is equal to ours seq 0x%08" PRIx32
|
||||
", cksum 0x%04" PRIx16 ", lifetime %" PRIu16
|
||||
"s",
|
||||
"ISIS-Snp (%s): is equal to ours seq 0x%08x, cksum 0x%04hx, lifetime %hus",
|
||||
areatag, seqno, checksum, rem_lifetime);
|
||||
}
|
||||
return LSP_EQUAL;
|
||||
@ -234,28 +230,22 @@ 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%08" PRIx32
|
||||
", cksum 0x%04" PRIx16 ", lifetime %" PRIu16
|
||||
"s",
|
||||
"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): is newer than ours seq 0x%08" PRIx32
|
||||
", cksum 0x%04" PRIx16 ", lifetime %" PRIu16
|
||||
"s",
|
||||
"ISIS-Snp (%s): is newer than ours seq 0x%08x, cksum 0x%04hx, lifetime %hus",
|
||||
areatag, lsp->hdr.seqno, lsp->hdr.checksum,
|
||||
lsp->hdr.rem_lifetime);
|
||||
}
|
||||
return LSP_NEWER;
|
||||
}
|
||||
if (IS_DEBUG_SNP_PACKETS) {
|
||||
zlog_debug("ISIS-Snp (%s): Compare LSP %s seq 0x%08" PRIx32
|
||||
", cksum 0x%04" PRIx16 ", lifetime %" PRIu16 "s",
|
||||
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): is older than ours seq 0x%08" PRIx32
|
||||
", cksum 0x%04" PRIx16 ", lifetime %" PRIu16 "s",
|
||||
"ISIS-Snp (%s): is older than ours seq 0x%08x, cksum 0x%04hx, lifetime %hus",
|
||||
areatag, lsp->hdr.seqno, lsp->hdr.checksum,
|
||||
lsp->hdr.rem_lifetime);
|
||||
}
|
||||
@ -656,15 +646,15 @@ void lsp_print(struct isis_lsp *lsp, struct vty *vty, char dynhost)
|
||||
|
||||
lspid_print(lsp->hdr.lsp_id, LSPid, dynhost, 1);
|
||||
vty_out(vty, "%-21s%c ", LSPid, lsp->own_lsp ? '*' : ' ');
|
||||
vty_out(vty, "%5" PRIu16 " ", lsp->hdr.pdu_len);
|
||||
vty_out(vty, "0x%08" PRIx32 " ", lsp->hdr.seqno);
|
||||
vty_out(vty, "0x%04" PRIx16 " ", lsp->hdr.checksum);
|
||||
vty_out(vty, "%5hu ", lsp->hdr.pdu_len);
|
||||
vty_out(vty, "0x%08x ", lsp->hdr.seqno);
|
||||
vty_out(vty, "0x%04hx ", lsp->hdr.checksum);
|
||||
if (lsp->hdr.rem_lifetime == 0) {
|
||||
snprintf(age_out, sizeof(age_out), "(%d)", lsp->age_out);
|
||||
age_out[7] = '\0';
|
||||
vty_out(vty, "%7s ", age_out);
|
||||
} else
|
||||
vty_out(vty, " %5" PRIu16 " ", lsp->hdr.rem_lifetime);
|
||||
vty_out(vty, " %5hu ", lsp->hdr.rem_lifetime);
|
||||
vty_out(vty, "%s\n", lsp_bits2string(lsp->hdr.lsp_bits, b, sizeof(b)));
|
||||
}
|
||||
|
||||
@ -994,7 +984,7 @@ static void lsp_build(struct isis_lsp *lsp, struct isis_area *area)
|
||||
|
||||
if (fabricd) {
|
||||
lsp_debug(
|
||||
"ISIS (%s): Adding tier %" PRIu8 " spine-leaf-extension tlv.",
|
||||
"ISIS (%s): Adding tier %hhu spine-leaf-extension tlv.",
|
||||
area->area_tag, fabricd_tier(area));
|
||||
isis_tlvs_add_spine_leaf(lsp->tlvs, fabricd_tier(area), true,
|
||||
false, false, false);
|
||||
@ -1256,9 +1246,7 @@ int lsp_generate(struct isis_area *area, int level)
|
||||
&area->t_lsp_refresh[level - 1]);
|
||||
|
||||
if (IS_DEBUG_UPDATE_PACKETS) {
|
||||
zlog_debug("ISIS-Upd (%s): Building L%d LSP %s, len %" PRIu16
|
||||
", seq 0x%08" PRIx32 ", cksum 0x%04" PRIx16
|
||||
", lifetime %" PRIu16 "s refresh %" PRIu16 "s",
|
||||
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,
|
||||
@ -1341,9 +1329,7 @@ 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 %" PRIu16
|
||||
", seq 0x%08" PRIx32 ", cksum 0x%04" PRIx16
|
||||
", lifetime %" PRIu16 "s refresh %" PRIu16 "s",
|
||||
"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),
|
||||
lsp->hdr.pdu_len, lsp->hdr.seqno, lsp->hdr.checksum,
|
||||
lsp->hdr.rem_lifetime, refresh_time);
|
||||
@ -1654,9 +1640,7 @@ 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 %" PRIu16
|
||||
", seq 0x%08" PRIx32 ", cksum 0x%04" PRIx16
|
||||
", lifetime %" PRIu16 "s, refresh %" PRIu16 "s",
|
||||
"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,
|
||||
@ -1711,9 +1695,7 @@ 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 %" PRIu16
|
||||
", seq 0x%08" PRIx32 ", cksum 0x%04" PRIx16
|
||||
", lifetime %" PRIu16 "s, refresh %" PRIu16 "s",
|
||||
"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,
|
||||
@ -1926,7 +1908,7 @@ int lsp_tick(struct thread *thread)
|
||||
|
||||
if (lsp->age_out == 0) {
|
||||
zlog_debug(
|
||||
"ISIS-Upd (%s): L%u LSP %s seq 0x%08" PRIx32 " aged out",
|
||||
"ISIS-Upd (%s): L%u LSP %s seq 0x%08x aged out",
|
||||
area->area_tag, lsp->level,
|
||||
rawlspid_print(lsp->hdr.lsp_id),
|
||||
lsp->hdr.seqno);
|
||||
|
@ -190,7 +190,7 @@ const char *nlpid2str(uint8_t nlpid)
|
||||
case NLPID_ESIS:
|
||||
return "ES-IS";
|
||||
default:
|
||||
snprintf(buf, sizeof(buf), "%" PRIu8, nlpid);
|
||||
snprintf(buf, sizeof(buf), "%hhu", nlpid);
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ const char *isis_mtid2str(uint16_t mtid)
|
||||
case ISIS_MT_IPV6_DSTSRC:
|
||||
return "ipv6-dstsrc";
|
||||
default:
|
||||
snprintf(buf, sizeof(buf), "%" PRIu16, mtid);
|
||||
snprintf(buf, sizeof(buf), "%hu", mtid);
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
|
@ -1503,7 +1503,7 @@ int isis_instance_segment_routing_srgb_lower_bound_modify(
|
||||
switch (args->event) {
|
||||
case NB_EV_VALIDATE:
|
||||
if (!IS_MPLS_UNRESERVED_LABEL(lower_bound)) {
|
||||
zlog_warn("Invalid SRGB lower bound: %" PRIu32,
|
||||
zlog_warn("Invalid SRGB lower bound: %u",
|
||||
lower_bound);
|
||||
return NB_ERR_VALIDATION;
|
||||
}
|
||||
@ -1528,7 +1528,7 @@ int isis_instance_segment_routing_srgb_upper_bound_modify(
|
||||
switch (args->event) {
|
||||
case NB_EV_VALIDATE:
|
||||
if (!IS_MPLS_UNRESERVED_LABEL(upper_bound)) {
|
||||
zlog_warn("Invalid SRGB upper bound: %" PRIu32,
|
||||
zlog_warn("Invalid SRGB upper bound: %u",
|
||||
upper_bound);
|
||||
return NB_ERR_VALIDATION;
|
||||
}
|
||||
@ -1601,7 +1601,7 @@ int isis_instance_segment_routing_srlb_lower_bound_modify(
|
||||
switch (args->event) {
|
||||
case NB_EV_VALIDATE:
|
||||
if (!IS_MPLS_UNRESERVED_LABEL(lower_bound)) {
|
||||
zlog_warn("Invalid SRLB lower bound: %" PRIu32,
|
||||
zlog_warn("Invalid SRLB lower bound: %u",
|
||||
lower_bound);
|
||||
return NB_ERR_VALIDATION;
|
||||
}
|
||||
@ -1626,7 +1626,7 @@ int isis_instance_segment_routing_srlb_upper_bound_modify(
|
||||
switch (args->event) {
|
||||
case NB_EV_VALIDATE:
|
||||
if (!IS_MPLS_UNRESERVED_LABEL(upper_bound)) {
|
||||
zlog_warn("Invalid SRLB upper bound: %" PRIu32,
|
||||
zlog_warn("Invalid SRLB upper bound: %u",
|
||||
upper_bound);
|
||||
return NB_ERR_VALIDATION;
|
||||
}
|
||||
@ -1854,8 +1854,7 @@ int lib_interface_isis_create(struct nb_cb_create_args *args)
|
||||
#endif /* ifndef FABRICD */
|
||||
if (actual_mtu < min_mtu) {
|
||||
snprintf(args->errmsg, args->errmsg_len,
|
||||
"Interface %s has MTU %" PRIu32
|
||||
", minimum MTU for the area is %" PRIu32 "",
|
||||
"Interface %s has MTU %u, minimum MTU for the area is %u",
|
||||
ifp->name, actual_mtu, min_mtu);
|
||||
return NB_ERR_VALIDATION;
|
||||
}
|
||||
|
@ -427,7 +427,7 @@ static int process_p2p_hello(struct iih_info *iih)
|
||||
|
||||
if (IS_DEBUG_ADJ_PACKETS) {
|
||||
zlog_debug(
|
||||
"ISIS-Adj (%s): Rcvd P2P IIH from (%s), cir type %s, cir id %hhu, length %" PRIu16,
|
||||
"ISIS-Adj (%s): Rcvd P2P IIH from (%s), cir type %s, cir id %hhu, length %hu",
|
||||
iih->circuit->area->area_tag,
|
||||
iih->circuit->interface->name,
|
||||
circuit_t2string(iih->circuit->is_type),
|
||||
@ -646,7 +646,7 @@ static int process_hello(uint8_t pdu_type, struct isis_circuit *circuit,
|
||||
|
||||
if (pdu_len_validate(iih.pdu_len, circuit)) {
|
||||
zlog_warn(
|
||||
"ISIS-Adj (%s): Rcvd %s from (%s) with invalid pdu length %" PRIu16,
|
||||
"ISIS-Adj (%s): Rcvd %s from (%s) with invalid pdu length %hu",
|
||||
circuit->area->area_tag, pdu_name,
|
||||
circuit->interface->name, iih.pdu_len);
|
||||
circuit->rej_adjacencies++;
|
||||
@ -859,16 +859,14 @@ static int process_lsp(uint8_t pdu_type, struct isis_circuit *circuit,
|
||||
#endif /* ifndef FABRICD */
|
||||
|
||||
if (pdu_len_validate(hdr.pdu_len, circuit)) {
|
||||
zlog_debug("ISIS-Upd (%s): LSP %s invalid LSP length %" PRIu16,
|
||||
zlog_debug("ISIS-Upd (%s): LSP %s invalid LSP length %hu",
|
||||
circuit->area->area_tag, rawlspid_print(hdr.lsp_id),
|
||||
hdr.pdu_len);
|
||||
return ISIS_WARNING;
|
||||
}
|
||||
|
||||
if (IS_DEBUG_UPDATE_PACKETS) {
|
||||
zlog_debug("ISIS-Upd (%s): Rcvd L%d LSP %s, seq 0x%08" PRIx32
|
||||
", cksum 0x%04" PRIx16 ", lifetime %" PRIu16
|
||||
"s, len %" PRIu16 ", on %s",
|
||||
zlog_debug("ISIS-Upd (%s): Rcvd L%d LSP %s, seq 0x%08x, cksum 0x%04hx, lifetime %hus, len %hu, on %s",
|
||||
circuit->area->area_tag, level,
|
||||
rawlspid_print(hdr.lsp_id), hdr.seqno, hdr.checksum,
|
||||
hdr.rem_lifetime, hdr.pdu_len,
|
||||
@ -878,7 +876,7 @@ static int process_lsp(uint8_t pdu_type, struct isis_circuit *circuit,
|
||||
/* lsp is_type check */
|
||||
if ((hdr.lsp_bits & IS_LEVEL_1) != IS_LEVEL_1) {
|
||||
zlog_debug(
|
||||
"ISIS-Upd (%s): LSP %s invalid LSP is type 0x%" PRIx8,
|
||||
"ISIS-Upd (%s): LSP %s invalid LSP is type 0x%hhx",
|
||||
circuit->area->area_tag, rawlspid_print(hdr.lsp_id),
|
||||
hdr.lsp_bits & IS_LEVEL_1_AND_2);
|
||||
/* continue as per RFC1122 Be liberal in what you accept, and
|
||||
@ -890,7 +888,7 @@ static int process_lsp(uint8_t pdu_type, struct isis_circuit *circuit,
|
||||
if (iso_csum_verify(STREAM_DATA(circuit->rcv_stream) + 12,
|
||||
hdr.pdu_len - 12, hdr.checksum, 12)) {
|
||||
zlog_debug(
|
||||
"ISIS-Upd (%s): LSP %s invalid LSP checksum 0x%04" PRIx16,
|
||||
"ISIS-Upd (%s): LSP %s invalid LSP checksum 0x%04hx",
|
||||
circuit->area->area_tag, rawlspid_print(hdr.lsp_id),
|
||||
hdr.checksum);
|
||||
return ISIS_WARNING;
|
||||
@ -983,9 +981,7 @@ static int process_lsp(uint8_t pdu_type, struct isis_circuit *circuit,
|
||||
if (circuit->circ_type == CIRCUIT_T_BROADCAST) {
|
||||
if (!isis_adj_lookup_snpa(ssnpa,
|
||||
circuit->u.bc.adjdb[level - 1])) {
|
||||
zlog_debug("(%s): DS ======= LSP %s, seq 0x%08" PRIx32
|
||||
", cksum 0x%04" PRIx16 ", lifetime %" PRIu16
|
||||
"s on %s",
|
||||
zlog_debug("(%s): DS ======= LSP %s, seq 0x%08x, cksum 0x%04hx, lifetime %hus on %s",
|
||||
circuit->area->area_tag,
|
||||
rawlspid_print(hdr.lsp_id), hdr.seqno,
|
||||
hdr.checksum, hdr.rem_lifetime,
|
||||
@ -1026,8 +1022,7 @@ dontcheckadj:
|
||||
if (lsp && (lsp->hdr.seqno == hdr.seqno)
|
||||
&& (lsp->hdr.checksum != hdr.checksum)
|
||||
&& hdr.rem_lifetime) {
|
||||
zlog_warn("ISIS-Upd (%s): LSP %s seq 0x%08" PRIx32
|
||||
" with confused checksum received.",
|
||||
zlog_warn("ISIS-Upd (%s): LSP %s seq 0x%08x with confused checksum received.",
|
||||
circuit->area->area_tag, rawlspid_print(hdr.lsp_id),
|
||||
hdr.seqno);
|
||||
hdr.rem_lifetime = 0;
|
||||
@ -1122,7 +1117,7 @@ dontcheckadj:
|
||||
}
|
||||
if (IS_DEBUG_UPDATE_PACKETS)
|
||||
zlog_debug(
|
||||
"ISIS-Upd (%s): (1) re-originating LSP %s new seq 0x%08" PRIx32,
|
||||
"ISIS-Upd (%s): (1) re-originating LSP %s new seq 0x%08x",
|
||||
circuit->area->area_tag,
|
||||
rawlspid_print(hdr.lsp_id),
|
||||
lsp->hdr.seqno);
|
||||
@ -1164,7 +1159,7 @@ dontcheckadj:
|
||||
#endif /* ifndef FABRICD */
|
||||
if (IS_DEBUG_UPDATE_PACKETS) {
|
||||
zlog_debug(
|
||||
"ISIS-Upd (%s): (2) re-originating LSP %s new seq 0x%08" PRIx32,
|
||||
"ISIS-Upd (%s): (2) re-originating LSP %s new seq 0x%08x",
|
||||
circuit->area->area_tag,
|
||||
rawlspid_print(hdr.lsp_id),
|
||||
lsp->hdr.seqno);
|
||||
@ -1411,8 +1406,7 @@ static int process_snp(uint8_t pdu_type, struct isis_circuit *circuit,
|
||||
for (struct isis_lsp_entry *entry = entry_head; entry;
|
||||
entry = entry->next) {
|
||||
zlog_debug(
|
||||
"ISIS-Snp (%s): %cSNP entry %s, seq 0x%08" PRIx32
|
||||
", cksum 0x%04" PRIx16 ", lifetime %" PRIu16 "s",
|
||||
"ISIS-Snp (%s): %cSNP entry %s, seq 0x%08x, cksum 0x%04hx, lifetime %hus",
|
||||
circuit->area->area_tag, typechar,
|
||||
rawlspid_print(entry->id), entry->seqno,
|
||||
entry->checksum, entry->rem_lifetime);
|
||||
@ -1605,18 +1599,18 @@ int isis_handle_pdu(struct isis_circuit *circuit, uint8_t *ssnpa)
|
||||
|
||||
if (idrp == ISO9542_ESIS) {
|
||||
flog_err(EC_LIB_DEVELOPMENT,
|
||||
"No support for ES-IS packet IDRP=%" PRIx8, idrp);
|
||||
"No support for ES-IS packet IDRP=%hhx", idrp);
|
||||
return ISIS_ERROR;
|
||||
}
|
||||
|
||||
if (idrp != ISO10589_ISIS) {
|
||||
flog_err(EC_ISIS_PACKET, "Not an IS-IS packet IDRP=%" PRIx8,
|
||||
flog_err(EC_ISIS_PACKET, "Not an IS-IS packet IDRP=%hhx",
|
||||
idrp);
|
||||
return ISIS_ERROR;
|
||||
}
|
||||
|
||||
if (version1 != 1) {
|
||||
zlog_warn("Unsupported ISIS version %" PRIu8, version1);
|
||||
zlog_warn("Unsupported ISIS version %hhu", version1);
|
||||
#ifndef FABRICD
|
||||
/* send northbound notification */
|
||||
isis_notif_version_skew(circuit, version1, raw_pdu);
|
||||
@ -1627,8 +1621,7 @@ int isis_handle_pdu(struct isis_circuit *circuit, uint8_t *ssnpa)
|
||||
if (id_len != 0 && id_len != ISIS_SYS_ID_LEN) {
|
||||
flog_err(
|
||||
EC_ISIS_PACKET,
|
||||
"IDFieldLengthMismatch: ID Length field in a received PDU %" PRIu8
|
||||
", while the parameter for this IS is %u",
|
||||
"IDFieldLengthMismatch: ID Length field in a received PDU %hhu, while the parameter for this IS is %u",
|
||||
id_len, ISIS_SYS_ID_LEN);
|
||||
circuit->id_len_mismatches++;
|
||||
#ifndef FABRICD
|
||||
@ -1640,14 +1633,13 @@ int isis_handle_pdu(struct isis_circuit *circuit, uint8_t *ssnpa)
|
||||
|
||||
uint8_t expected_length;
|
||||
if (pdu_size(pdu_type, &expected_length)) {
|
||||
zlog_warn("Unsupported ISIS PDU %" PRIu8, pdu_type);
|
||||
zlog_warn("Unsupported ISIS PDU %hhu", pdu_type);
|
||||
return ISIS_WARNING;
|
||||
}
|
||||
|
||||
if (length != expected_length) {
|
||||
flog_err(EC_ISIS_PACKET,
|
||||
"Expected fixed header length = %" PRIu8
|
||||
" but got %" PRIu8,
|
||||
"Expected fixed header length = %hhu but got %hhu",
|
||||
expected_length, length);
|
||||
return ISIS_ERROR;
|
||||
}
|
||||
@ -1660,7 +1652,7 @@ int isis_handle_pdu(struct isis_circuit *circuit, uint8_t *ssnpa)
|
||||
}
|
||||
|
||||
if (version2 != 1) {
|
||||
zlog_warn("Unsupported ISIS PDU version %" PRIu8, version2);
|
||||
zlog_warn("Unsupported ISIS PDU version %hhu", version2);
|
||||
#ifndef FABRICD
|
||||
/* send northbound notification */
|
||||
isis_notif_version_skew(circuit, version2, raw_pdu);
|
||||
@ -1680,8 +1672,7 @@ int isis_handle_pdu(struct isis_circuit *circuit, uint8_t *ssnpa)
|
||||
&& max_area_addrs != isis->max_area_addrs) {
|
||||
flog_err(
|
||||
EC_ISIS_PACKET,
|
||||
"maximumAreaAddressesMismatch: maximumAreaAdresses in a received PDU %" PRIu8
|
||||
" while the parameter for this IS is %u",
|
||||
"maximumAreaAddressesMismatch: maximumAreaAdresses in a received PDU %hhu while the parameter for this IS is %u",
|
||||
max_area_addrs, isis->max_area_addrs);
|
||||
circuit->max_area_addr_mismatches++;
|
||||
#ifndef FABRICD
|
||||
@ -2401,9 +2392,7 @@ void send_lsp(struct isis_circuit *circuit, struct isis_lsp *lsp,
|
||||
if (stream_get_endp(lsp->pdu) > stream_get_size(circuit->snd_stream)) {
|
||||
flog_err(
|
||||
EC_ISIS_PACKET,
|
||||
"ISIS-Upd (%s): Can't send L%d LSP %s, seq 0x%08" PRIx32
|
||||
", cksum 0x%04" PRIx16 ", lifetime %" PRIu16
|
||||
"s on %s. LSP Size is %zu while interface stream size is %zu.",
|
||||
"ISIS-Upd (%s): Can't send L%d LSP %s, seq 0x%08x, cksum 0x%04hx, lifetime %hus on %s. LSP Size is %zu while interface stream size is %zu.",
|
||||
circuit->area->area_tag, lsp->level,
|
||||
rawlspid_print(lsp->hdr.lsp_id), lsp->hdr.seqno,
|
||||
lsp->hdr.checksum, lsp->hdr.rem_lifetime,
|
||||
@ -2431,9 +2420,7 @@ void send_lsp(struct isis_circuit *circuit, struct isis_lsp *lsp,
|
||||
}
|
||||
|
||||
if (IS_DEBUG_UPDATE_PACKETS) {
|
||||
zlog_debug("ISIS-Upd (%s): Sending %sL%d LSP %s, seq 0x%08" PRIx32
|
||||
", cksum 0x%04" PRIx16 ", lifetime %" PRIu16
|
||||
"s on %s",
|
||||
zlog_debug("ISIS-Upd (%s): Sending %sL%d LSP %s, seq 0x%08x, cksum 0x%04hx, lifetime %hus on %s",
|
||||
circuit->area->area_tag,
|
||||
(tx_type == TX_LSP_CIRCUIT_SCOPED)
|
||||
? "Circuit scoped " : "",
|
||||
|
@ -351,12 +351,12 @@ static void show_ext_sub(struct vty *vty, char *name,
|
||||
sbuf_reset(&buf);
|
||||
|
||||
if (IS_SUBTLV(ext, EXT_ADM_GRP))
|
||||
sbuf_push(&buf, 4, "Administrative Group: 0x%" PRIx32 "\n",
|
||||
sbuf_push(&buf, 4, "Administrative Group: 0x%x\n",
|
||||
ext->adm_group);
|
||||
if (IS_SUBTLV(ext, EXT_LLRI)) {
|
||||
sbuf_push(&buf, 4, "Link Local ID: %" PRIu32 "\n",
|
||||
sbuf_push(&buf, 4, "Link Local ID: %u\n",
|
||||
ext->local_llri);
|
||||
sbuf_push(&buf, 4, "Link Remote ID: %" PRIu32 "\n",
|
||||
sbuf_push(&buf, 4, "Link Remote ID: %u\n",
|
||||
ext->remote_llri);
|
||||
}
|
||||
if (IS_SUBTLV(ext, EXT_LOCAL_ADDR))
|
||||
@ -394,7 +394,7 @@ static void show_ext_sub(struct vty *vty, char *name,
|
||||
ext->te_metric);
|
||||
if (IS_SUBTLV(ext, EXT_RMT_AS))
|
||||
sbuf_push(&buf, 4,
|
||||
"Inter-AS TE Remote AS number: %" PRIu32 "\n",
|
||||
"Inter-AS TE Remote AS number: %u\n",
|
||||
ext->remote_as);
|
||||
if (IS_SUBTLV(ext, EXT_RMT_IP))
|
||||
sbuf_push(&buf, 4,
|
||||
@ -402,19 +402,18 @@ static void show_ext_sub(struct vty *vty, char *name,
|
||||
inet_ntoa(ext->remote_ip));
|
||||
if (IS_SUBTLV(ext, EXT_DELAY))
|
||||
sbuf_push(&buf, 4,
|
||||
"%s Average Link Delay: %" PRIu32 " (micro-sec)\n",
|
||||
"%s Average Link Delay: %u (micro-sec)\n",
|
||||
IS_ANORMAL(ext->delay) ? "Anomalous" : "Normal",
|
||||
ext->delay);
|
||||
if (IS_SUBTLV(ext, EXT_MM_DELAY)) {
|
||||
sbuf_push(&buf, 4, "%s Min/Max Link Delay: %" PRIu32 " / %"
|
||||
PRIu32 " (micro-sec)\n",
|
||||
sbuf_push(&buf, 4, "%s Min/Max Link Delay: %u / %u (micro-sec)\n",
|
||||
IS_ANORMAL(ext->min_delay) ? "Anomalous" : "Normal",
|
||||
ext->min_delay & TE_EXT_MASK,
|
||||
ext->max_delay & TE_EXT_MASK);
|
||||
}
|
||||
if (IS_SUBTLV(ext, EXT_DELAY_VAR))
|
||||
sbuf_push(&buf, 4,
|
||||
"Delay Variation: %" PRIu32 " (micro-sec)\n",
|
||||
"Delay Variation: %u (micro-sec)\n",
|
||||
ext->delay_var & TE_EXT_MASK);
|
||||
if (IS_SUBTLV(ext, EXT_PKT_LOSS))
|
||||
sbuf_push(&buf, 4, "%s Link Packet Loss: %g (%%)\n",
|
||||
|
@ -200,12 +200,12 @@ static void format_item_ext_subtlvs(struct isis_ext_subtlvs *exts,
|
||||
|
||||
/* Standard metrics */
|
||||
if (IS_SUBTLV(exts, EXT_ADM_GRP))
|
||||
sbuf_push(buf, indent, "Administrative Group: 0x%" PRIx32 "\n",
|
||||
sbuf_push(buf, indent, "Administrative Group: 0x%x\n",
|
||||
exts->adm_group);
|
||||
if (IS_SUBTLV(exts, EXT_LLRI)) {
|
||||
sbuf_push(buf, indent, "Link Local ID: %" PRIu32 "\n",
|
||||
sbuf_push(buf, indent, "Link Local ID: %u\n",
|
||||
exts->local_llri);
|
||||
sbuf_push(buf, indent, "Link Remote ID: %" PRIu32 "\n",
|
||||
sbuf_push(buf, indent, "Link Remote ID: %u\n",
|
||||
exts->remote_llri);
|
||||
}
|
||||
if (IS_SUBTLV(exts, EXT_LOCAL_ADDR))
|
||||
@ -243,7 +243,7 @@ static void format_item_ext_subtlvs(struct isis_ext_subtlvs *exts,
|
||||
exts->te_metric);
|
||||
if (IS_SUBTLV(exts, EXT_RMT_AS))
|
||||
sbuf_push(buf, indent,
|
||||
"Inter-AS TE Remote AS number: %" PRIu32 "\n",
|
||||
"Inter-AS TE Remote AS number: %u\n",
|
||||
exts->remote_as);
|
||||
if (IS_SUBTLV(exts, EXT_RMT_IP))
|
||||
sbuf_push(buf, indent,
|
||||
@ -252,19 +252,18 @@ static void format_item_ext_subtlvs(struct isis_ext_subtlvs *exts,
|
||||
/* Extended metrics */
|
||||
if (IS_SUBTLV(exts, EXT_DELAY))
|
||||
sbuf_push(buf, indent,
|
||||
"%s Average Link Delay: %" PRIu32 " (micro-sec)\n",
|
||||
"%s Average Link Delay: %u (micro-sec)\n",
|
||||
IS_ANORMAL(exts->delay) ? "Anomalous" : "Normal",
|
||||
exts->delay);
|
||||
if (IS_SUBTLV(exts, EXT_MM_DELAY)) {
|
||||
sbuf_push(buf, indent, "%s Min/Max Link Delay: %" PRIu32 " / %"
|
||||
PRIu32 " (micro-sec)\n",
|
||||
sbuf_push(buf, indent, "%s Min/Max Link Delay: %u / %u (micro-sec)\n",
|
||||
IS_ANORMAL(exts->min_delay) ? "Anomalous" : "Normal",
|
||||
exts->min_delay & TE_EXT_MASK,
|
||||
exts->max_delay & TE_EXT_MASK);
|
||||
}
|
||||
if (IS_SUBTLV(exts, EXT_DELAY_VAR)) {
|
||||
sbuf_push(buf, indent,
|
||||
"Delay Variation: %" PRIu32 " (micro-sec)\n",
|
||||
"Delay Variation: %u (micro-sec)\n",
|
||||
exts->delay_var & TE_EXT_MASK);
|
||||
}
|
||||
if (IS_SUBTLV(exts, EXT_PKT_LOSS))
|
||||
@ -297,8 +296,7 @@ static void format_item_ext_subtlvs(struct isis_ext_subtlvs *exts,
|
||||
continue;
|
||||
sbuf_push(
|
||||
buf, indent,
|
||||
"Adjacency-SID: %" PRIu32 ", Weight: %" PRIu8
|
||||
", Flags: F:%c B:%c, V:%c, L:%c, S:%c, P:%c\n",
|
||||
"Adjacency-SID: %u, Weight: %hhu, Flags: F:%c B:%c, V:%c, L:%c, S:%c, P:%c\n",
|
||||
adj->sid, adj->weight,
|
||||
adj->flags & EXT_SUBTLV_LINK_ADJ_SID_FFLG ? '1'
|
||||
: '0',
|
||||
@ -327,9 +325,7 @@ static void format_item_ext_subtlvs(struct isis_ext_subtlvs *exts,
|
||||
&& (lan->family != AF_INET6)))
|
||||
continue;
|
||||
sbuf_push(buf, indent,
|
||||
"Lan-Adjacency-SID: %" PRIu32
|
||||
", Weight: %" PRIu8
|
||||
", Flags: F:%c B:%c, V:%c, L:%c, S:%c, P:%c\n"
|
||||
"Lan-Adjacency-SID: %u, Weight: %hhu, Flags: F:%c B:%c, V:%c, L:%c, S:%c, P:%c\n"
|
||||
" Neighbor-ID: %s\n",
|
||||
lan->sid, lan->weight,
|
||||
lan->flags & EXT_SUBTLV_LINK_ADJ_SID_FFLG
|
||||
@ -542,7 +538,7 @@ static int unpack_item_ext_subtlvs(uint16_t mtid, uint8_t len, struct stream *s,
|
||||
subtlv_type = stream_getc(s);
|
||||
subtlv_len = stream_getc(s);
|
||||
if (subtlv_len > len - sum) {
|
||||
sbuf_push(log, indent, "TLV %" PRIu8 ": Available data %" PRIu8 " is less than TLV size %u !\n",
|
||||
sbuf_push(log, indent, "TLV %hhu: Available data %hhu is less than TLV size %u !\n",
|
||||
subtlv_type, len - sum, subtlv_len);
|
||||
return 1;
|
||||
}
|
||||
@ -812,11 +808,11 @@ static void format_item_prefix_sid(uint16_t mtid, struct isis_item *i,
|
||||
|
||||
sbuf_push(buf, indent, "SR Prefix-SID ");
|
||||
if (sid->flags & ISIS_PREFIX_SID_VALUE) {
|
||||
sbuf_push(buf, 0, "Label: %" PRIu32 ", ", sid->value);
|
||||
sbuf_push(buf, 0, "Label: %u, ", sid->value);
|
||||
} else {
|
||||
sbuf_push(buf, 0, "Index: %" PRIu32 ", ", sid->value);
|
||||
sbuf_push(buf, 0, "Index: %u, ", sid->value);
|
||||
}
|
||||
sbuf_push(buf, 0, "Algorithm: %" PRIu8 ", ", sid->algorithm);
|
||||
sbuf_push(buf, 0, "Algorithm: %hhu, ", sid->algorithm);
|
||||
sbuf_push(buf, 0, "Flags:%s%s%s%s%s%s\n",
|
||||
sid->flags & ISIS_PREFIX_SID_READVERTISED ? " READVERTISED"
|
||||
: "",
|
||||
@ -865,7 +861,7 @@ static int unpack_item_prefix_sid(uint16_t mtid, uint8_t len, struct stream *s,
|
||||
|
||||
if (len < 5) {
|
||||
sbuf_push(log, indent,
|
||||
"Not enough data left. (expected 5 or more bytes, got %" PRIu8 ")\n",
|
||||
"Not enough data left. (expected 5 or more bytes, got %hhu)\n",
|
||||
len);
|
||||
return 1;
|
||||
}
|
||||
@ -884,7 +880,7 @@ static int unpack_item_prefix_sid(uint16_t mtid, uint8_t len, struct stream *s,
|
||||
: ISIS_SUBTLV_PREFIX_SID_SIZE + 1;
|
||||
if (len != expected_size) {
|
||||
sbuf_push(log, indent,
|
||||
"TLV size differs from expected size. (expected %u but got %" PRIu8 ")\n",
|
||||
"TLV size differs from expected size. (expected %u but got %hhu)\n",
|
||||
expected_size, len);
|
||||
return 1;
|
||||
}
|
||||
@ -960,7 +956,7 @@ static int unpack_subtlv_ipv6_source_prefix(enum isis_tlv_context context,
|
||||
|
||||
if (tlv_len < 1) {
|
||||
sbuf_push(log, indent,
|
||||
"Not enough data left. (expected 1 or more bytes, got %" PRIu8 ")\n",
|
||||
"Not enough data left. (expected 1 or more bytes, got %hhu)\n",
|
||||
tlv_len);
|
||||
return 1;
|
||||
}
|
||||
@ -975,7 +971,7 @@ static int unpack_subtlv_ipv6_source_prefix(enum isis_tlv_context context,
|
||||
if (tlv_len != 1 + PSIZE(p.prefixlen)) {
|
||||
sbuf_push(
|
||||
log, indent,
|
||||
"TLV size differs from expected size for the prefixlen. (expected %u but got %" PRIu8 ")\n",
|
||||
"TLV size differs from expected size for the prefixlen. (expected %u but got %hhu)\n",
|
||||
1 + PSIZE(p.prefixlen), tlv_len);
|
||||
return 1;
|
||||
}
|
||||
@ -1147,8 +1143,7 @@ static int unpack_item_area_address(uint16_t mtid, uint8_t len,
|
||||
if (len < 1) {
|
||||
sbuf_push(
|
||||
log, indent,
|
||||
"Not enough data left. (Expected 1 byte of address length, got %" PRIu8
|
||||
")\n",
|
||||
"Not enough data left. (Expected 1 byte of address length, got %hhu)\n",
|
||||
len);
|
||||
goto out;
|
||||
}
|
||||
@ -1157,15 +1152,14 @@ static int unpack_item_area_address(uint16_t mtid, uint8_t len,
|
||||
rv->len = stream_getc(s);
|
||||
|
||||
if (len < 1 + rv->len) {
|
||||
sbuf_push(log, indent, "Not enough data left. (Expected %" PRIu8
|
||||
" bytes of address, got %" PRIu8 ")\n",
|
||||
sbuf_push(log, indent, "Not enough data left. (Expected %hhu bytes of address, got %hhu)\n",
|
||||
rv->len, len - 1);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (rv->len < 1 || rv->len > 20) {
|
||||
sbuf_push(log, indent,
|
||||
"Implausible area address length %" PRIu8 "\n",
|
||||
"Implausible area address length %hhu\n",
|
||||
rv->len);
|
||||
goto out;
|
||||
}
|
||||
@ -1197,7 +1191,7 @@ static void format_item_oldstyle_reach(uint16_t mtid, struct isis_item *i,
|
||||
{
|
||||
struct isis_oldstyle_reach *r = (struct isis_oldstyle_reach *)i;
|
||||
|
||||
sbuf_push(buf, indent, "IS Reachability: %s (Metric: %" PRIu8 ")\n",
|
||||
sbuf_push(buf, indent, "IS Reachability: %s (Metric: %hhu)\n",
|
||||
isis_format_id(r->id, 7), r->metric);
|
||||
}
|
||||
|
||||
@ -1232,8 +1226,7 @@ static int unpack_item_oldstyle_reach(uint16_t mtid, uint8_t len,
|
||||
if (len < 11) {
|
||||
sbuf_push(
|
||||
log, indent,
|
||||
"Not enough data left.(Expected 11 bytes of reach information, got %" PRIu8
|
||||
")\n",
|
||||
"Not enough data left.(Expected 11 bytes of reach information, got %hhu)\n",
|
||||
len);
|
||||
return 1;
|
||||
}
|
||||
@ -1298,8 +1291,7 @@ static int unpack_item_lan_neighbor(uint16_t mtid, uint8_t len,
|
||||
if (len < 6) {
|
||||
sbuf_push(
|
||||
log, indent,
|
||||
"Not enough data left.(Expected 6 bytes of mac, got %" PRIu8
|
||||
")\n",
|
||||
"Not enough data left.(Expected 6 bytes of mac, got %hhu)\n",
|
||||
len);
|
||||
return 1;
|
||||
}
|
||||
@ -1332,8 +1324,7 @@ static void format_item_lsp_entry(uint16_t mtid, struct isis_item *i,
|
||||
struct isis_lsp_entry *e = (struct isis_lsp_entry *)i;
|
||||
|
||||
sbuf_push(buf, indent,
|
||||
"LSP Entry: %s, seq 0x%08" PRIx32 ", cksum 0x%04" PRIx16
|
||||
", lifetime %" PRIu16 "s\n",
|
||||
"LSP Entry: %s, seq 0x%08x, cksum 0x%04hx, lifetime %hus\n",
|
||||
isis_format_id(e->id, 8), e->seqno, e->checksum,
|
||||
e->rem_lifetime);
|
||||
}
|
||||
@ -1367,7 +1358,7 @@ static int unpack_item_lsp_entry(uint16_t mtid, uint8_t len, struct stream *s,
|
||||
if (len < 16) {
|
||||
sbuf_push(
|
||||
log, indent,
|
||||
"Not enough data left. (Expected 16 bytes of LSP info, got %" PRIu8,
|
||||
"Not enough data left. (Expected 16 bytes of LSP info, got %hhu",
|
||||
len);
|
||||
return 1;
|
||||
}
|
||||
@ -1465,8 +1456,7 @@ static int unpack_item_extended_reach(uint16_t mtid, uint8_t len,
|
||||
|
||||
if (len < 11) {
|
||||
sbuf_push(log, indent,
|
||||
"Not enough data left. (expected 11 or more bytes, got %"
|
||||
PRIu8 ")\n",
|
||||
"Not enough data left. (expected 11 or more bytes, got %hhu)\n",
|
||||
len);
|
||||
goto out;
|
||||
}
|
||||
@ -1478,13 +1468,12 @@ static int unpack_item_extended_reach(uint16_t mtid, uint8_t len,
|
||||
|
||||
if ((size_t)len < ((size_t)11) + subtlv_len) {
|
||||
sbuf_push(log, indent,
|
||||
"Not enough data left for subtlv size %" PRIu8
|
||||
", there are only %" PRIu8 " bytes left.\n",
|
||||
"Not enough data left for subtlv size %hhu, there are only %hhu bytes left.\n",
|
||||
subtlv_len, len - 11);
|
||||
goto out;
|
||||
}
|
||||
|
||||
sbuf_push(log, indent, "Storing %" PRIu8 " bytes of subtlvs\n",
|
||||
sbuf_push(log, indent, "Storing %hhu bytes of subtlvs\n",
|
||||
subtlv_len);
|
||||
|
||||
if (subtlv_len) {
|
||||
@ -1523,7 +1512,7 @@ static void format_item_oldstyle_ip_reach(uint16_t mtid, struct isis_item *i,
|
||||
struct isis_oldstyle_ip_reach *r = (struct isis_oldstyle_ip_reach *)i;
|
||||
char prefixbuf[PREFIX2STR_BUFFER];
|
||||
|
||||
sbuf_push(buf, indent, "IP Reachability: %s (Metric: %" PRIu8 ")\n",
|
||||
sbuf_push(buf, indent, "IP Reachability: %s (Metric: %hhu)\n",
|
||||
prefix2str(&r->prefix, prefixbuf, sizeof(prefixbuf)),
|
||||
r->metric);
|
||||
}
|
||||
@ -1561,8 +1550,7 @@ static int unpack_item_oldstyle_ip_reach(uint16_t mtid, uint8_t len,
|
||||
if (len < 12) {
|
||||
sbuf_push(
|
||||
log, indent,
|
||||
"Not enough data left.(Expected 12 bytes of reach information, got %" PRIu8
|
||||
")\n",
|
||||
"Not enough data left.(Expected 12 bytes of reach information, got %hhu)\n",
|
||||
len);
|
||||
return 1;
|
||||
}
|
||||
@ -1711,8 +1699,7 @@ static int unpack_item_ipv4_address(uint16_t mtid, uint8_t len,
|
||||
if (len < 4) {
|
||||
sbuf_push(
|
||||
log, indent,
|
||||
"Not enough data left.(Expected 4 bytes of IPv4 address, got %" PRIu8
|
||||
")\n",
|
||||
"Not enough data left.(Expected 4 bytes of IPv4 address, got %hhu)\n",
|
||||
len);
|
||||
return 1;
|
||||
}
|
||||
@ -1773,8 +1760,7 @@ static int unpack_item_ipv6_address(uint16_t mtid, uint8_t len,
|
||||
if (len < 16) {
|
||||
sbuf_push(
|
||||
log, indent,
|
||||
"Not enough data left.(Expected 16 bytes of IPv6 address, got %" PRIu8
|
||||
")\n",
|
||||
"Not enough data left.(Expected 16 bytes of IPv6 address, got %hhu)\n",
|
||||
len);
|
||||
return 1;
|
||||
}
|
||||
@ -1845,8 +1831,7 @@ static int unpack_item_mt_router_info(uint16_t mtid, uint8_t len,
|
||||
if (len < 2) {
|
||||
sbuf_push(
|
||||
log, indent,
|
||||
"Not enough data left.(Expected 2 bytes of MT info, got %" PRIu8
|
||||
")\n",
|
||||
"Not enough data left.(Expected 2 bytes of MT info, got %hhu)\n",
|
||||
len);
|
||||
return 1;
|
||||
}
|
||||
@ -2023,7 +2008,7 @@ static int unpack_item_extended_ip_reach(uint16_t mtid, uint8_t len,
|
||||
consume = 5;
|
||||
if (len < consume) {
|
||||
sbuf_push(log, indent,
|
||||
"Not enough data left. (expected 5 or more bytes, got %" PRIu8 ")\n",
|
||||
"Not enough data left. (expected 5 or more bytes, got %hhu)\n",
|
||||
len);
|
||||
goto out;
|
||||
}
|
||||
@ -2073,8 +2058,7 @@ static int unpack_item_extended_ip_reach(uint16_t mtid, uint8_t len,
|
||||
consume += subtlv_len;
|
||||
if (len < consume) {
|
||||
sbuf_push(log, indent,
|
||||
"Expected %" PRIu8
|
||||
" bytes of subtlvs, but only %u bytes available.\n",
|
||||
"Expected %hhu bytes of subtlvs, but only %u bytes available.\n",
|
||||
subtlv_len,
|
||||
len - 6 - PSIZE(rv->prefix.prefixlen));
|
||||
goto out;
|
||||
@ -2207,7 +2191,7 @@ static void format_tlv_spine_leaf(const struct isis_spine_leaf *spine_leaf,
|
||||
if (spine_leaf->tier == ISIS_TIER_UNDEFINED) {
|
||||
sbuf_push(buf, indent, " Tier: undefined\n");
|
||||
} else {
|
||||
sbuf_push(buf, indent, " Tier: %" PRIu8 "\n",
|
||||
sbuf_push(buf, indent, " Tier: %hhu\n",
|
||||
spine_leaf->tier);
|
||||
}
|
||||
}
|
||||
@ -2340,14 +2324,14 @@ static void format_tlv_threeway_adj(const struct isis_threeway_adj *threeway_adj
|
||||
sbuf_push(buf, indent, " State: %s (%d)\n",
|
||||
isis_threeway_state_name(threeway_adj->state),
|
||||
threeway_adj->state);
|
||||
sbuf_push(buf, indent, " Extended Local Circuit ID: %" PRIu32 "\n",
|
||||
sbuf_push(buf, indent, " Extended Local Circuit ID: %u\n",
|
||||
threeway_adj->local_circuit_id);
|
||||
if (!threeway_adj->neighbor_set)
|
||||
return;
|
||||
|
||||
sbuf_push(buf, indent, " Neighbor System ID: %s\n",
|
||||
isis_format_id(threeway_adj->neighbor_id, 6));
|
||||
sbuf_push(buf, indent, " Neighbor Extended Circuit ID: %" PRIu32 "\n",
|
||||
sbuf_push(buf, indent, " Neighbor Extended Circuit ID: %u\n",
|
||||
threeway_adj->neighbor_circuit_id);
|
||||
}
|
||||
|
||||
@ -2506,8 +2490,7 @@ static int unpack_item_ipv6_reach(uint16_t mtid, uint8_t len, struct stream *s,
|
||||
consume = 6;
|
||||
if (len < consume) {
|
||||
sbuf_push(log, indent,
|
||||
"Not enough data left. (expected 6 or more bytes, got %"
|
||||
PRIu8 ")\n",
|
||||
"Not enough data left. (expected 6 or more bytes, got %hhu)\n",
|
||||
len);
|
||||
goto out;
|
||||
}
|
||||
@ -2559,8 +2542,7 @@ static int unpack_item_ipv6_reach(uint16_t mtid, uint8_t len, struct stream *s,
|
||||
consume += subtlv_len;
|
||||
if (len < consume) {
|
||||
sbuf_push(log, indent,
|
||||
"Expected %" PRIu8
|
||||
" bytes of subtlvs, but only %u bytes available.\n",
|
||||
"Expected %hhu bytes of subtlvs, but only %u bytes available.\n",
|
||||
subtlv_len,
|
||||
len - 6 - PSIZE(rv->prefix.prefixlen));
|
||||
goto out;
|
||||
@ -2910,12 +2892,12 @@ static void format_item_auth(uint16_t mtid, struct isis_item *i,
|
||||
case ISIS_PASSWD_TYPE_HMAC_MD5:
|
||||
for (unsigned int j = 0; j < 16; j++) {
|
||||
snprintf(obuf + 2 * j, sizeof(obuf) - 2 * j,
|
||||
"%02" PRIx8, auth->value[j]);
|
||||
"%02hhx", auth->value[j]);
|
||||
}
|
||||
sbuf_push(buf, indent, " HMAC-MD5: %s\n", obuf);
|
||||
break;
|
||||
default:
|
||||
sbuf_push(buf, indent, " Unknown (%" PRIu8 ")\n", auth->type);
|
||||
sbuf_push(buf, indent, " Unknown (%hhu)\n", auth->type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2961,8 +2943,7 @@ static int unpack_item_auth(uint16_t mtid, uint8_t len, struct stream *s,
|
||||
if (len < 1) {
|
||||
sbuf_push(
|
||||
log, indent,
|
||||
"Not enough data left.(Expected 1 bytes of auth type, got %" PRIu8
|
||||
")\n",
|
||||
"Not enough data left.(Expected 1 bytes of auth type, got %hhu)\n",
|
||||
len);
|
||||
return 1;
|
||||
}
|
||||
@ -2975,8 +2956,7 @@ static int unpack_item_auth(uint16_t mtid, uint8_t len, struct stream *s,
|
||||
if (rv->type == ISIS_PASSWD_TYPE_HMAC_MD5 && rv->length != 16) {
|
||||
sbuf_push(
|
||||
log, indent,
|
||||
"Unexpected auth length for HMAC-MD5 (expected 16, got %" PRIu8
|
||||
")\n",
|
||||
"Unexpected auth length for HMAC-MD5 (expected 16, got %hhu)\n",
|
||||
rv->length);
|
||||
XFREE(MTYPE_ISIS_TLV, rv);
|
||||
return 1;
|
||||
@ -3060,8 +3040,7 @@ static int unpack_tlv_purge_originator(enum isis_tlv_context context,
|
||||
|
||||
sbuf_push(log, indent, "Unpacking Purge Originator Identification TLV...\n");
|
||||
if (tlv_len < 7) {
|
||||
sbuf_push(log, indent, "Not enough data left. (Expected at least 7 bytes, got %"
|
||||
PRIu8 ")\n", tlv_len);
|
||||
sbuf_push(log, indent, "Not enough data left. (Expected at least 7 bytes, got %hhu)\n", tlv_len);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -3072,8 +3051,7 @@ static int unpack_tlv_purge_originator(enum isis_tlv_context context,
|
||||
} else if (number_of_ids == 2) {
|
||||
poi.sender_set = true;
|
||||
} else {
|
||||
sbuf_push(log, indent, "Got invalid value for number of system IDs: %"
|
||||
PRIu8 ")\n", number_of_ids);
|
||||
sbuf_push(log, indent, "Got invalid value for number of system IDs: %hhu)\n", number_of_ids);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -4017,7 +3995,7 @@ static int unpack_tlv_unknown(enum isis_tlv_context context, uint8_t tlv_type,
|
||||
{
|
||||
stream_forward_getp(s, tlv_len);
|
||||
sbuf_push(log, indent,
|
||||
"Skipping unknown TLV %" PRIu8 " (%" PRIu8 " bytes)\n",
|
||||
"Skipping unknown TLV %hhu (%hhu bytes)\n",
|
||||
tlv_type, tlv_len);
|
||||
return 0;
|
||||
}
|
||||
@ -4043,12 +4021,12 @@ static int unpack_tlv(enum isis_tlv_context context, size_t avail_len,
|
||||
tlv_len = stream_getc(stream);
|
||||
|
||||
sbuf_push(log, indent + 2,
|
||||
"Found TLV of type %" PRIu8 " and len %" PRIu8 ".\n",
|
||||
"Found TLV of type %hhu and len %hhu.\n",
|
||||
tlv_type, tlv_len);
|
||||
|
||||
if (avail_len < ((size_t)tlv_len) + 2) {
|
||||
sbuf_push(log, indent + 2,
|
||||
"Available data %zu too short for claimed TLV len %" PRIu8 ".\n",
|
||||
"Available data %zu too short for claimed TLV len %hhu.\n",
|
||||
avail_len - 2, tlv_len);
|
||||
return 1;
|
||||
}
|
||||
|
@ -1344,7 +1344,7 @@ DEFUN (show_isis_summary,
|
||||
if (tier == ISIS_TIER_UNDEFINED)
|
||||
vty_out(vty, " Tier: undefined\n");
|
||||
else
|
||||
vty_out(vty, " Tier: %" PRIu8 "\n", tier);
|
||||
vty_out(vty, " Tier: %hhu\n", tier);
|
||||
}
|
||||
|
||||
if (listcount(area->area_addrs) > 0) {
|
||||
|
@ -130,7 +130,7 @@ void log_ref_display(struct vty *vty, uint32_t code, bool json)
|
||||
if (json) {
|
||||
char key[11];
|
||||
|
||||
snprintf(key, sizeof(key), "%"PRIu32, ref->code);
|
||||
snprintf(key, sizeof(key), "%u", ref->code);
|
||||
obj = json_object_new_object();
|
||||
json_object_string_add(obj, "title", ref->title);
|
||||
json_object_string_add(obj, "description",
|
||||
@ -142,7 +142,7 @@ void log_ref_display(struct vty *vty, uint32_t code, bool json)
|
||||
char pbuf[256];
|
||||
char ubuf[256];
|
||||
|
||||
snprintf(pbuf, sizeof(pbuf), "\nError %"PRIu32" - %s",
|
||||
snprintf(pbuf, sizeof(pbuf), "\nError %u - %s",
|
||||
ref->code, ref->title);
|
||||
memset(ubuf, '=', strlen(pbuf));
|
||||
ubuf[strlen(pbuf)] = '\0';
|
||||
|
@ -108,7 +108,7 @@ static struct id_alloc_page *find_or_create_page(struct id_alloc *alloc,
|
||||
} else if (page != NULL && create) {
|
||||
flog_err(
|
||||
EC_LIB_ID_CONSISTENCY,
|
||||
"ID Allocator %s attempt to re-create page at %" PRIu32,
|
||||
"ID Allocator %s attempt to re-create page at %u",
|
||||
alloc->name, id);
|
||||
}
|
||||
|
||||
@ -131,8 +131,7 @@ void idalloc_free(struct id_alloc *alloc, uint32_t id)
|
||||
page = find_or_create_page(alloc, id, 0);
|
||||
if (!page) {
|
||||
flog_err(EC_LIB_ID_CONSISTENCY,
|
||||
"ID Allocator %s cannot free #%" PRIu32
|
||||
". ID Block does not exist.",
|
||||
"ID Allocator %s cannot free #%u. ID Block does not exist.",
|
||||
alloc->name, id);
|
||||
return;
|
||||
}
|
||||
@ -142,8 +141,7 @@ void idalloc_free(struct id_alloc *alloc, uint32_t id)
|
||||
|
||||
if ((page->allocated_mask[word] & (1 << offset)) == 0) {
|
||||
flog_err(EC_LIB_ID_CONSISTENCY,
|
||||
"ID Allocator %s cannot free #%" PRIu32
|
||||
". ID was not allocated at the time of free.",
|
||||
"ID Allocator %s cannot free #%u. ID was not allocated at the time of free.",
|
||||
alloc->name, id);
|
||||
return;
|
||||
}
|
||||
@ -285,8 +283,7 @@ uint32_t idalloc_reserve(struct id_alloc *alloc, uint32_t id)
|
||||
|
||||
if (page->allocated_mask[word] & (((uint32_t)1) << offset)) {
|
||||
flog_err(EC_LIB_ID_CONSISTENCY,
|
||||
"ID Allocator %s could not reserve %" PRIu32
|
||||
" because it is already allocated.",
|
||||
"ID Allocator %s could not reserve %u because it is already allocated.",
|
||||
alloc->name, id);
|
||||
return IDALLOC_INVALID;
|
||||
}
|
||||
|
@ -64,13 +64,13 @@ struct message {
|
||||
|
||||
/* For logs which have error codes associated with them */
|
||||
#define flog_err(ferr_id, format, ...) \
|
||||
zlog_err("[EC %" PRIu32 "] " format, ferr_id, ##__VA_ARGS__)
|
||||
zlog_err("[EC %u] " format, ferr_id, ##__VA_ARGS__)
|
||||
#define flog_err_sys(ferr_id, format, ...) \
|
||||
flog_err(ferr_id, format, ##__VA_ARGS__)
|
||||
#define flog_warn(ferr_id, format, ...) \
|
||||
zlog_warn("[EC %" PRIu32 "] " format, ferr_id, ##__VA_ARGS__)
|
||||
zlog_warn("[EC %u] " format, ferr_id, ##__VA_ARGS__)
|
||||
#define flog(priority, ferr_id, format, ...) \
|
||||
zlog(priority, "[EC %" PRIu32 "] " format, ferr_id, ##__VA_ARGS__)
|
||||
zlog(priority, "[EC %u] " format, ferr_id, ##__VA_ARGS__)
|
||||
|
||||
extern void zlog_thread_info(int log_level);
|
||||
|
||||
|
@ -1283,8 +1283,7 @@ int pim_bsm_process(struct interface *ifp, struct ip *ip_hdr, uint8_t *buf,
|
||||
pim_inet4_dump("<bsr?>", bshdr->bsr_addr.addr, bsr_str,
|
||||
sizeof(bsr_str));
|
||||
if (bshdr->hm_len > 32) {
|
||||
zlog_warn("Bad hashmask length for IPv4; got %" PRIu8
|
||||
", expected value in range 0-32",
|
||||
zlog_warn("Bad hashmask length for IPv4; got %hhu, expected value in range 0-32",
|
||||
bshdr->hm_len);
|
||||
pim->bsm_dropped++;
|
||||
return -1;
|
||||
|
@ -78,8 +78,7 @@ bool pim_nexthop_lookup(struct pim_instance *pim, struct pim_nexthop *nexthop,
|
||||
pim_addr_dump("<nexthop?>", &nexthop->mrib_nexthop_addr,
|
||||
nexthop_str, sizeof(nexthop_str));
|
||||
zlog_debug(
|
||||
"%s: Using last lookup for %s at %lld, %" PRId64
|
||||
" addr %s",
|
||||
"%s: Using last lookup for %s at %lld, %" PRId64" addr %s",
|
||||
__func__, addr_str, nexthop->last_lookup_time,
|
||||
pim->last_route_change_time, nexthop_str);
|
||||
}
|
||||
|
24
vrrpd/vrrp.c
24
vrrpd/vrrp.c
@ -867,8 +867,7 @@ static int vrrp_recv_advertisement(struct vrrp_router *r, struct ipaddr *src,
|
||||
if (pkt->hdr.vrid != r->vr->vrid) {
|
||||
DEBUGD(&vrrp_dbg_proto,
|
||||
VRRP_LOGPFX VRRP_LOGPFX_VRID VRRP_LOGPFX_FAM
|
||||
"Datagram invalid: Advertisement contains VRID %" PRIu8
|
||||
" which does not match our instance",
|
||||
"Datagram invalid: Advertisement contains VRID %hhu which does not match our instance",
|
||||
r->vr->vrid, family2str(r->family), pkt->hdr.vrid);
|
||||
return -1;
|
||||
}
|
||||
@ -888,8 +887,7 @@ static int vrrp_recv_advertisement(struct vrrp_router *r, struct ipaddr *src,
|
||||
if (r->vr->version == 2 && !adveq) {
|
||||
DEBUGD(&vrrp_dbg_proto,
|
||||
VRRP_LOGPFX VRRP_LOGPFX_VRID VRRP_LOGPFX_FAM
|
||||
"Datagram invalid: Received advertisement with advertisement interval %" PRIu8
|
||||
" unequal to our configured value %u",
|
||||
"Datagram invalid: Received advertisement with advertisement interval %hhu unequal to our configured value %u",
|
||||
r->vr->vrid, family2str(r->family),
|
||||
pkt->hdr.v2.adver_int,
|
||||
MAX(r->vr->advertisement_interval / 100, 1));
|
||||
@ -901,8 +899,7 @@ static int vrrp_recv_advertisement(struct vrrp_router *r, struct ipaddr *src,
|
||||
if (pkt->hdr.naddr != r->addrs->count)
|
||||
DEBUGD(&vrrp_dbg_proto,
|
||||
VRRP_LOGPFX VRRP_LOGPFX_VRID VRRP_LOGPFX_FAM
|
||||
"Datagram has %" PRIu8
|
||||
" addresses, but this VRRP instance has %u",
|
||||
"Datagram has %hhu addresses, but this VRRP instance has %u",
|
||||
r->vr->vrid, family2str(r->family), pkt->hdr.naddr,
|
||||
r->addrs->count);
|
||||
|
||||
@ -926,8 +923,7 @@ static int vrrp_recv_advertisement(struct vrrp_router *r, struct ipaddr *src,
|
||||
&& addrcmp > 0)) {
|
||||
zlog_info(
|
||||
VRRP_LOGPFX VRRP_LOGPFX_VRID VRRP_LOGPFX_FAM
|
||||
"Received advertisement from %s w/ priority %" PRIu8
|
||||
"; switching to Backup",
|
||||
"Received advertisement from %s w/ priority %hhu; switching to Backup",
|
||||
r->vr->vrid, family2str(r->family), sipstr,
|
||||
pkt->hdr.priority);
|
||||
THREAD_OFF(r->t_adver_timer);
|
||||
@ -946,8 +942,7 @@ static int vrrp_recv_advertisement(struct vrrp_router *r, struct ipaddr *src,
|
||||
/* Discard advertisement */
|
||||
DEBUGD(&vrrp_dbg_proto,
|
||||
VRRP_LOGPFX VRRP_LOGPFX_VRID VRRP_LOGPFX_FAM
|
||||
"Discarding advertisement from %s (%" PRIu8
|
||||
" <= %" PRIu8 " & %s <= %s)",
|
||||
"Discarding advertisement from %s (%hhu <= %hhu & %s <= %s)",
|
||||
r->vr->vrid, family2str(r->family), sipstr,
|
||||
pkt->hdr.priority, r->priority, sipstr, dipstr);
|
||||
}
|
||||
@ -975,8 +970,7 @@ static int vrrp_recv_advertisement(struct vrrp_router *r, struct ipaddr *src,
|
||||
/* Discard advertisement */
|
||||
DEBUGD(&vrrp_dbg_proto,
|
||||
VRRP_LOGPFX VRRP_LOGPFX_VRID VRRP_LOGPFX_FAM
|
||||
"Discarding advertisement from %s (%" PRIu8
|
||||
" < %" PRIu8 " & preempt = true)",
|
||||
"Discarding advertisement from %s (%hhu < %hhu & preempt = true)",
|
||||
r->vr->vrid, family2str(r->family), sipstr,
|
||||
pkt->hdr.priority, r->priority);
|
||||
}
|
||||
@ -2353,11 +2347,11 @@ int vrrp_config_write_global(struct vty *vty)
|
||||
|
||||
/* FIXME: needs to be udpated for full YANG conversion. */
|
||||
if (vd.priority != VRRP_DEFAULT_PRIORITY && ++writes)
|
||||
vty_out(vty, "vrrp default priority %" PRIu8 "\n", vd.priority);
|
||||
vty_out(vty, "vrrp default priority %hhu\n", vd.priority);
|
||||
|
||||
if (vd.advertisement_interval != VRRP_DEFAULT_ADVINT && ++writes)
|
||||
vty_out(vty,
|
||||
"vrrp default advertisement-interval %" PRIu16 "\n",
|
||||
"vrrp default advertisement-interval %hu\n",
|
||||
vd.advertisement_interval * CS2MS);
|
||||
|
||||
if (vd.preempt_mode != VRRP_DEFAULT_PREEMPT && ++writes)
|
||||
@ -2380,7 +2374,7 @@ static unsigned int vrrp_hash_key(const void *arg)
|
||||
const struct vrrp_vrouter *vr = arg;
|
||||
char key[IFNAMSIZ + 64];
|
||||
|
||||
snprintf(key, sizeof(key), "%s@%" PRIu8, vr->ifp->name, vr->vrid);
|
||||
snprintf(key, sizeof(key), "%s@%hhu", vr->ifp->name, vr->vrid);
|
||||
|
||||
return string_hash_make(key);
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ lib_interface_vrrp_vrrp_group_get_keys(struct nb_cb_get_keys_args *args)
|
||||
const struct vrrp_vrouter *vr = args->list_entry;
|
||||
|
||||
args->keys->num = 1;
|
||||
snprintf(args->keys->key[0], sizeof(args->keys->key[0]), "%" PRIu32,
|
||||
snprintf(args->keys->key[0], sizeof(args->keys->key[0]), "%u",
|
||||
vr->vrid);
|
||||
|
||||
return NB_OK;
|
||||
|
@ -222,13 +222,12 @@ ssize_t vrrp_pkt_parse_datagram(int family, int version, struct msghdr *m,
|
||||
/* IP total length check */
|
||||
VRRP_PKT_VCHECK(
|
||||
ntohs(ip->ip_len) == read,
|
||||
"IPv4 packet length field does not match # received bytes; %" PRIu16
|
||||
"!= %zu",
|
||||
"IPv4 packet length field does not match # received bytes; %hu!= %zu",
|
||||
ntohs(ip->ip_len), read);
|
||||
|
||||
/* TTL check */
|
||||
VRRP_PKT_VCHECK(ip->ip_ttl == 255,
|
||||
"IPv4 TTL is %" PRIu8 "; should be 255",
|
||||
"IPv4 TTL is %hhu; should be 255",
|
||||
ip->ip_ttl);
|
||||
|
||||
*pkt = (struct vrrp_pkt *)(buf + (ip->ip_hl << 2));
|
||||
@ -256,7 +255,7 @@ ssize_t vrrp_pkt_parse_datagram(int family, int version, struct msghdr *m,
|
||||
uint8_t *hoplimit = CMSG_DATA(c);
|
||||
|
||||
VRRP_PKT_VCHECK(*hoplimit == 255,
|
||||
"IPv6 Hop Limit is %" PRIu8 "; should be 255",
|
||||
"IPv6 Hop Limit is %hhu; should be 255",
|
||||
*hoplimit);
|
||||
|
||||
*pkt = (struct vrrp_pkt *)buf;
|
||||
@ -293,11 +292,11 @@ ssize_t vrrp_pkt_parse_datagram(int family, int version, struct msghdr *m,
|
||||
uint16_t chksum = vrrp_pkt_checksum(*pkt, pktsize, src);
|
||||
|
||||
VRRP_PKT_VCHECK((*pkt)->hdr.chksum == chksum,
|
||||
"Bad VRRP checksum %" PRIx16 "; should be %" PRIx16 "",
|
||||
"Bad VRRP checksum %hx; should be %hx",
|
||||
(*pkt)->hdr.chksum, chksum);
|
||||
|
||||
/* Type check */
|
||||
VRRP_PKT_VCHECK(((*pkt)->hdr.vertype & 0x0F) == 1, "Bad type %" PRIu8,
|
||||
VRRP_PKT_VCHECK(((*pkt)->hdr.vertype & 0x0F) == 1, "Bad type %hhu",
|
||||
(*pkt)->hdr.vertype & 0x0f);
|
||||
|
||||
/* Exact size check */
|
||||
@ -309,7 +308,7 @@ ssize_t vrrp_pkt_parse_datagram(int family, int version, struct msghdr *m,
|
||||
/* auth type check */
|
||||
if (version == 2)
|
||||
VRRP_PKT_VCHECK((*pkt)->hdr.v2.auth_type == 0,
|
||||
"Bad authentication type %" PRIu8,
|
||||
"Bad authentication type %hhu",
|
||||
(*pkt)->hdr.v2.auth_type);
|
||||
|
||||
/* Addresses check */
|
||||
@ -318,7 +317,7 @@ ssize_t vrrp_pkt_parse_datagram(int family, int version, struct msghdr *m,
|
||||
|
||||
for (uint8_t i = 0; i < (*pkt)->hdr.naddr; i++) {
|
||||
VRRP_PKT_VCHECK(inet_ntop(family, p, vbuf, sizeof(vbuf)),
|
||||
"Bad IP address, #%" PRIu8, i);
|
||||
"Bad IP address, #%hhu", i);
|
||||
p += addrsz;
|
||||
}
|
||||
|
||||
|
@ -470,8 +470,8 @@ static void vrrp_show(struct vty *vty, struct vrrp_vrouter *vr)
|
||||
|
||||
struct ttable *tt = ttable_new(&ttable_styles[TTSTYLE_BLANK]);
|
||||
|
||||
ttable_add_row(tt, "%s|%" PRIu32, "Virtual Router ID", vr->vrid);
|
||||
ttable_add_row(tt, "%s|%" PRIu8, "Protocol Version", vr->version);
|
||||
ttable_add_row(tt, "%s|%u", "Virtual Router ID", vr->vrid);
|
||||
ttable_add_row(tt, "%s|%hhu", "Protocol Version", vr->version);
|
||||
ttable_add_row(tt, "%s|%s", "Autoconfigured",
|
||||
vr->autoconf ? "Yes" : "No");
|
||||
ttable_add_row(tt, "%s|%s", "Shutdown", vr->shutdown ? "Yes" : "No");
|
||||
@ -492,10 +492,10 @@ static void vrrp_show(struct vty *vty, struct vrrp_vrouter *vr)
|
||||
ttable_add_row(tt, "%s|%s", "Virtual MAC (v6)", ethstr6);
|
||||
ttable_add_row(tt, "%s|%s", "Status (v4)", stastr4);
|
||||
ttable_add_row(tt, "%s|%s", "Status (v6)", stastr6);
|
||||
ttable_add_row(tt, "%s|%" PRIu8, "Priority", vr->priority);
|
||||
ttable_add_row(tt, "%s|%" PRIu8, "Effective Priority (v4)",
|
||||
ttable_add_row(tt, "%s|%hhu", "Priority", vr->priority);
|
||||
ttable_add_row(tt, "%s|%hhu", "Effective Priority (v4)",
|
||||
vr->v4->priority);
|
||||
ttable_add_row(tt, "%s|%" PRIu8, "Effective Priority (v6)",
|
||||
ttable_add_row(tt, "%s|%hhu", "Effective Priority (v6)",
|
||||
vr->v6->priority);
|
||||
ttable_add_row(tt, "%s|%s", "Preempt Mode",
|
||||
vr->preempt_mode ? "Yes" : "No");
|
||||
@ -509,21 +509,21 @@ static void vrrp_show(struct vty *vty, struct vrrp_vrouter *vr)
|
||||
ttable_add_row(tt, "%s|%d ms",
|
||||
"Master Advertisement Interval (v6)",
|
||||
vr->v6->master_adver_interval * CS2MS);
|
||||
ttable_add_row(tt, "%s|%" PRIu32, "Advertisements Tx (v4)",
|
||||
ttable_add_row(tt, "%s|%u", "Advertisements Tx (v4)",
|
||||
vr->v4->stats.adver_tx_cnt);
|
||||
ttable_add_row(tt, "%s|%" PRIu32, "Advertisements Tx (v6)",
|
||||
ttable_add_row(tt, "%s|%u", "Advertisements Tx (v6)",
|
||||
vr->v6->stats.adver_tx_cnt);
|
||||
ttable_add_row(tt, "%s|%" PRIu32, "Advertisements Rx (v4)",
|
||||
ttable_add_row(tt, "%s|%u", "Advertisements Rx (v4)",
|
||||
vr->v4->stats.adver_rx_cnt);
|
||||
ttable_add_row(tt, "%s|%" PRIu32, "Advertisements Rx (v6)",
|
||||
ttable_add_row(tt, "%s|%u", "Advertisements Rx (v6)",
|
||||
vr->v6->stats.adver_rx_cnt);
|
||||
ttable_add_row(tt, "%s|%" PRIu32, "Gratuitous ARP Tx (v4)",
|
||||
ttable_add_row(tt, "%s|%u", "Gratuitous ARP Tx (v4)",
|
||||
vr->v4->stats.garp_tx_cnt);
|
||||
ttable_add_row(tt, "%s|%" PRIu32, "Neigh. Adverts Tx (v6)",
|
||||
ttable_add_row(tt, "%s|%u", "Neigh. Adverts Tx (v6)",
|
||||
vr->v6->stats.una_tx_cnt);
|
||||
ttable_add_row(tt, "%s|%" PRIu32, "State transitions (v4)",
|
||||
ttable_add_row(tt, "%s|%u", "State transitions (v4)",
|
||||
vr->v4->stats.trans_cnt);
|
||||
ttable_add_row(tt, "%s|%" PRIu32, "State transitions (v6)",
|
||||
ttable_add_row(tt, "%s|%u", "State transitions (v6)",
|
||||
vr->v6->stats.trans_cnt);
|
||||
ttable_add_row(tt, "%s|%d ms", "Skew Time (v4)",
|
||||
vr->v4->skew_time * CS2MS);
|
||||
@ -653,7 +653,7 @@ DEFPY(vrrp_vrid_show_summary,
|
||||
continue;
|
||||
|
||||
ttable_add_row(
|
||||
tt, "%s|%" PRIu8 "|%" PRIu8 "|%d|%d|%s|%s",
|
||||
tt, "%s|%hhu|%hhu|%d|%d|%s|%s",
|
||||
vr->ifp->name, vr->vrid, vr->priority,
|
||||
vr->v4->addrs->count, vr->v6->addrs->count,
|
||||
vr->v4->fsm.state == VRRP_STATE_MASTER ? "Master"
|
||||
|
@ -2562,8 +2562,7 @@ static inline void zread_rule(ZAPI_HANDLER_ARGS)
|
||||
if (!(zpr.rule.filter.src_ip.family == AF_INET
|
||||
|| zpr.rule.filter.src_ip.family == AF_INET6)) {
|
||||
zlog_warn(
|
||||
"Unsupported PBR source IP family: %s (%" PRIu8
|
||||
")",
|
||||
"Unsupported PBR source IP family: %s (%hhu)",
|
||||
family2str(zpr.rule.filter.src_ip.family),
|
||||
zpr.rule.filter.src_ip.family);
|
||||
return;
|
||||
@ -2571,8 +2570,7 @@ static inline void zread_rule(ZAPI_HANDLER_ARGS)
|
||||
if (!(zpr.rule.filter.dst_ip.family == AF_INET
|
||||
|| zpr.rule.filter.dst_ip.family == AF_INET6)) {
|
||||
zlog_warn(
|
||||
"Unsupported PBR destination IP family: %s (%" PRIu8
|
||||
")",
|
||||
"Unsupported PBR destination IP family: %s (%hhu)",
|
||||
family2str(zpr.rule.filter.dst_ip.family),
|
||||
zpr.rule.filter.dst_ip.family);
|
||||
return;
|
||||
@ -2667,16 +2665,14 @@ static inline void zread_ipset_entry(ZAPI_HANDLER_ARGS)
|
||||
if (!(zpi.dst.family == AF_INET
|
||||
|| zpi.dst.family == AF_INET6)) {
|
||||
zlog_warn(
|
||||
"Unsupported PBR destination IP family: %s (%" PRIu8
|
||||
")",
|
||||
"Unsupported PBR destination IP family: %s (%hhu)",
|
||||
family2str(zpi.dst.family), zpi.dst.family);
|
||||
goto stream_failure;
|
||||
}
|
||||
if (!(zpi.src.family == AF_INET
|
||||
|| zpi.src.family == AF_INET6)) {
|
||||
zlog_warn(
|
||||
"Unsupported PBR source IP family: %s (%" PRIu8
|
||||
")",
|
||||
"Unsupported PBR source IP family: %s (%hhu)",
|
||||
family2str(zpi.src.family), zpi.src.family);
|
||||
goto stream_failure;
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ int lib_vrf_zebra_ribs_rib_get_keys(struct nb_cb_get_keys_args *args)
|
||||
snprintfrr(args->keys->key[0], sizeof(args->keys->key[0]), "%s:%s",
|
||||
"frr-zebra",
|
||||
zebra_afi_safi_value2identity(zrt->afi, zrt->safi));
|
||||
snprintfrr(args->keys->key[1], sizeof(args->keys->key[1]), "%" PRIu32,
|
||||
snprintfrr(args->keys->key[1], sizeof(args->keys->key[1]), "%u",
|
||||
zrt->tableid);
|
||||
|
||||
return NB_OK;
|
||||
|
@ -3236,8 +3236,7 @@ DEFUN (show_zebra,
|
||||
RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) {
|
||||
struct zebra_vrf *zvrf = vrf->info;
|
||||
|
||||
vty_out(vty, "%-25s %10" PRIu64 " %10" PRIu64 " %10" PRIu64
|
||||
" %10" PRIu64 " %10" PRIu64 "\n",
|
||||
vty_out(vty, "%-25s %10" PRIu64 " %10" PRIu64 " %10" PRIu64" %10" PRIu64 " %10" PRIu64 "\n",
|
||||
vrf->name, zvrf->installs, zvrf->removals,
|
||||
zvrf->neigh_updates, zvrf->lsp_installs,
|
||||
zvrf->lsp_removals);
|
||||
|
Loading…
Reference in New Issue
Block a user