summaryrefslogtreecommitdiffstats
path: root/ripd/rip_interface.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-05-28 09:58:30 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-05-28 09:58:30 -0700
commit86f447e58b2d673ac0776781558e956469054b6f (patch)
treeb1f613046b1597b46af5422cfeeca6143224f2b8 /ripd/rip_interface.c
parentce0f89b568b2170583ce53961b414b226cf96bbb (diff)
downloadquagga-86f447e58b2d673ac0776781558e956469054b6f.tar.bz2
quagga-86f447e58b2d673ac0776781558e956469054b6f.tar.xz
flag field printf formatting in debug strings
Potential format incompatiablities because flags field in zebra is uint64_t but the printf format was only 32 bit. For safety, convert the flags field to unsigned long long. Since it is really a bit field print in hex.
Diffstat (limited to 'ripd/rip_interface.c')
-rw-r--r--ripd/rip_interface.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c
index b6d9240f..915cd911 100644
--- a/ripd/rip_interface.c
+++ b/ripd/rip_interface.c
@@ -253,6 +253,7 @@ rip_request_neighbor (struct in_addr addr)
rip_request_send (&to, NULL, rip->version_send, NULL);
}
+#if 0
/* Request routes at all interfaces. */
static void
rip_request_neighbor_all (void)
@@ -270,6 +271,7 @@ rip_request_neighbor_all (void)
if (rp->info)
rip_request_neighbor (rp->p.u.prefix4);
}
+#endif
/* Multicast packet receive socket. */
static int
@@ -403,8 +405,9 @@ rip_interface_down (int command, struct zclient *zclient, zebra_size_t length)
rip_if_down(ifp);
if (IS_RIP_DEBUG_ZEBRA)
- zlog_debug ("interface %s index %d flags %ld metric %d mtu %d is down",
- ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu);
+ zlog_debug ("interface %s index %d flags %#llx metric %d mtu %d is down",
+ ifp->name, ifp->ifindex, (unsigned long long) ifp->flags,
+ ifp->metric, ifp->mtu);
return 0;
}
@@ -423,8 +426,9 @@ rip_interface_up (int command, struct zclient *zclient, zebra_size_t length)
return 0;
if (IS_RIP_DEBUG_ZEBRA)
- zlog_debug ("interface %s index %d flags %ld metric %d mtu %d is up",
- ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu);
+ zlog_debug ("interface %s index %d flags %#llx metric %d mtu %d is up",
+ ifp->name, ifp->ifindex, (unsigned long long)ifp->flags,
+ ifp->metric, ifp->mtu);
/* Check if this interface is RIP enabled or not.*/
rip_enable_apply (ifp);
@@ -447,8 +451,9 @@ rip_interface_add (int command, struct zclient *zclient, zebra_size_t length)
ifp = zebra_interface_add_read (zclient->ibuf);
if (IS_RIP_DEBUG_ZEBRA)
- zlog_debug ("interface add %s index %d flags %ld metric %d mtu %d",
- ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu);
+ zlog_debug ("interface add %s index %d flags %#llx metric %d mtu %d",
+ ifp->name, ifp->ifindex, (unsigned long long) ifp->flags,
+ ifp->metric, ifp->mtu);
/* Check if this interface is RIP enabled or not.*/
rip_enable_apply (ifp);
@@ -486,8 +491,9 @@ rip_interface_delete (int command, struct zclient *zclient,
rip_if_down(ifp);
}
- zlog_info("interface delete %s index %d flags %ld metric %d mtu %d",
- ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu);
+ zlog_info("interface delete %s index %d flags %#llx metric %d mtu %d",
+ ifp->name, ifp->ifindex, (unsigned long long)ifp->flags,
+ ifp->metric, ifp->mtu);
/* To support pseudo interface do not free interface structure. */
/* if_delete(ifp); */