summaryrefslogtreecommitdiffstats
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@opensourcerouting.org>2020-02-10 22:40:43 +0100
committerRafael Zalamena <rzalamena@opensourcerouting.org>2020-04-14 19:05:52 +0200
commita50404aaaee0f116e2a684df97a9d53d80cb0182 (patch)
treec901558632697b8b6d1c2c13943bc571b7d83fbb /zebra/rt_netlink.c
parentzebra: data plane FPM add support RMAC VNI (diff)
downloadfrr-a50404aaaee0f116e2a684df97a9d53d80cb0182.tar.xz
frr-a50404aaaee0f116e2a684df97a9d53d80cb0182.zip
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>
Diffstat (limited to '')
-rw-r--r--zebra/rt_netlink.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 7ca4425dc..c4af082e7 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -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);
}
/*