mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 17:40:04 +00:00
zebra: fix some formatting/style issues
* Break lines longer than 80 columns. * Remove space after '('. * Use '%pIX' instead of 'inet_ntop'. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
parent
f2a0ba3a50
commit
a50404aaae
@ -308,15 +308,19 @@ DEFUN(fpm_show_counters_json, fpm_show_counters_json_cmd,
|
||||
json_object_int_add(jo, "bytes-sent", gfnc->counters.bytes_sent);
|
||||
json_object_int_add(jo, "obuf-bytes", gfnc->counters.obuf_bytes);
|
||||
json_object_int_add(jo, "obuf-bytes-peak", gfnc->counters.obuf_peak);
|
||||
json_object_int_add(jo, "connection-closes", gfnc->counters.connection_closes);
|
||||
json_object_int_add(jo, "connection-errors", gfnc->counters.connection_errors);
|
||||
json_object_int_add(jo, "data-plane-contexts", gfnc->counters.dplane_contexts);
|
||||
json_object_int_add(jo, "connection-closes",
|
||||
gfnc->counters.connection_closes);
|
||||
json_object_int_add(jo, "connection-errors",
|
||||
gfnc->counters.connection_errors);
|
||||
json_object_int_add(jo, "data-plane-contexts",
|
||||
gfnc->counters.dplane_contexts);
|
||||
json_object_int_add(jo, "data-plane-contexts-queue",
|
||||
gfnc->counters.ctxqueue_len);
|
||||
json_object_int_add(jo, "data-plane-contexts-queue-peak",
|
||||
gfnc->counters.ctxqueue_len_peak);
|
||||
json_object_int_add(jo, "buffer-full-hits", gfnc->counters.buffer_full);
|
||||
json_object_int_add(jo, "user-configures", gfnc->counters.user_configures);
|
||||
json_object_int_add(jo, "user-configures",
|
||||
gfnc->counters.user_configures);
|
||||
json_object_int_add(jo, "user-disables", gfnc->counters.user_disables);
|
||||
vty_out(vty, "%s\n", json_object_to_json_string_ext(jo, 0));
|
||||
json_object_free(jo);
|
||||
@ -762,14 +766,12 @@ static int fpm_rib_send(struct thread *t)
|
||||
for (rn = route_top(rt); rn; rn = srcdest_route_next(rn)) {
|
||||
dest = rib_dest_from_rnode(rn);
|
||||
/* Skip bad route entries. */
|
||||
if (dest == NULL || dest->selected_fib == NULL) {
|
||||
if (dest == NULL || dest->selected_fib == NULL)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Check for already sent routes. */
|
||||
if (CHECK_FLAG(dest->flags, RIB_DEST_UPDATE_FPM)) {
|
||||
if (CHECK_FLAG(dest->flags, RIB_DEST_UPDATE_FPM))
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Enqueue route install. */
|
||||
dplane_ctx_reset(ctx);
|
||||
|
@ -1290,7 +1290,6 @@ _netlink_route_build_multipath(const struct prefix *p, const char *routedesc,
|
||||
char label_buf[256];
|
||||
int num_labels = 0;
|
||||
struct vrf *vrf;
|
||||
char addrstr[INET6_ADDRSTRLEN];
|
||||
|
||||
rtnh->rtnh_len = sizeof(*rtnh);
|
||||
rtnh->rtnh_flags = 0;
|
||||
@ -1377,14 +1376,11 @@ _netlink_route_build_multipath(const struct prefix *p, const char *routedesc,
|
||||
else if (nexthop->src.ipv4.s_addr != INADDR_ANY)
|
||||
*src = &nexthop->src;
|
||||
|
||||
if (IS_ZEBRA_DEBUG_KERNEL) {
|
||||
inet_ntop(AF_INET, &nexthop->gate.ipv4, addrstr,
|
||||
sizeof(addrstr));
|
||||
zlog_debug( "%s: (%s): %pFX nexthop via %s %s if %u vrf %s(%u)",
|
||||
__func__, routedesc, p, addrstr, label_buf,
|
||||
nexthop->ifindex, VRF_LOGNAME(vrf),
|
||||
nexthop->vrf_id);
|
||||
}
|
||||
if (IS_ZEBRA_DEBUG_KERNEL)
|
||||
zlog_debug("%s: (%s): %pFX nexthop via %pI4 %s if %u vrf %s(%u)",
|
||||
__func__, routedesc, p, &nexthop->gate.ipv4,
|
||||
label_buf, nexthop->ifindex,
|
||||
VRF_LOGNAME(vrf), nexthop->vrf_id);
|
||||
}
|
||||
if (nexthop->type == NEXTHOP_TYPE_IPV6
|
||||
|| nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX) {
|
||||
@ -1397,14 +1393,11 @@ _netlink_route_build_multipath(const struct prefix *p, const char *routedesc,
|
||||
else if (!IN6_IS_ADDR_UNSPECIFIED(&nexthop->src.ipv6))
|
||||
*src = &nexthop->src;
|
||||
|
||||
if (IS_ZEBRA_DEBUG_KERNEL) {
|
||||
inet_ntop(AF_INET, &nexthop->gate.ipv6, addrstr,
|
||||
sizeof(addrstr));
|
||||
zlog_debug( "%s: (%s): %pFX nexthop via %s %s if %u vrf %s(%u)",
|
||||
__func__, routedesc, p, addrstr, label_buf,
|
||||
nexthop->ifindex, VRF_LOGNAME(vrf),
|
||||
nexthop->vrf_id);
|
||||
}
|
||||
if (IS_ZEBRA_DEBUG_KERNEL)
|
||||
zlog_debug("%s: (%s): %pFX nexthop via %pI6 %s if %u vrf %s(%u)",
|
||||
__func__, routedesc, p, &nexthop->gate.ipv6,
|
||||
label_buf, nexthop->ifindex,
|
||||
VRF_LOGNAME(vrf), nexthop->vrf_id);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user