From ddc943dec3c017583f81cce388c7d453293156c7 Mon Sep 17 00:00:00 2001 From: "Jorge Boncompte [DTI2]" Date: Fri, 13 Apr 2012 13:46:07 +0200 Subject: bgpd, zebra: Fix format for some metric outputs Metrics are unsigned values. * bgpd/bgp_{debug,route,vty}.c, * zebra/zebra_vty.c: replace %d with %u for metrics & distances Signed-off-by: Jorge Boncompte [DTI2] [reworded commit message] Signed-off-by: David Lamparter --- bgpd/bgp_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bgpd/bgp_debug.c') diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index 8e161864..e3e3ec86 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -194,11 +194,11 @@ bgp_dump_attr (struct peer *peer, struct attr *attr, char *buf, size_t size) #endif /* HAVE_IPV6 */ if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_LOCAL_PREF))) - snprintf (buf + strlen (buf), size - strlen (buf), ", localpref %d", + snprintf (buf + strlen (buf), size - strlen (buf), ", localpref %u", attr->local_pref); if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_MULTI_EXIT_DISC))) - snprintf (buf + strlen (buf), size - strlen (buf), ", metric %d", + snprintf (buf + strlen (buf), size - strlen (buf), ", metric %u", attr->med); if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_COMMUNITIES))) -- cgit v1.2.1