diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-05-28 09:58:30 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-05-28 09:58:30 -0700 |
commit | 86f447e58b2d673ac0776781558e956469054b6f (patch) | |
tree | b1f613046b1597b46af5422cfeeca6143224f2b8 | |
parent | ce0f89b568b2170583ce53961b414b226cf96bbb (diff) | |
download | quagga-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.
-rw-r--r-- | ripd/rip_interface.c | 22 | ||||
-rw-r--r-- | ripngd/ripng_interface.c | 14 |
2 files changed, 22 insertions, 14 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); */ diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c index 140e3bef..c25677e7 100644 --- a/ripngd/ripng_interface.c +++ b/ripngd/ripng_interface.c @@ -243,8 +243,9 @@ ripng_interface_up (int command, struct zclient *zclient, zebra_size_t length) return 0; if (IS_RIPNG_DEBUG_ZEBRA) - zlog_debug ("interface up %s index %d flags %ld metric %d mtu %d", - ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu6); + zlog_debug ("interface up %s index %d flags %#llx metric %d mtu %d", + ifp->name, ifp->ifindex, (unsigned long long) ifp->flags, + ifp->metric, ifp->mtu6); /* Check if this interface is RIPng enabled or not. */ ripng_enable_apply (ifp); @@ -276,8 +277,9 @@ ripng_interface_down (int command, struct zclient *zclient, ripng_if_down (ifp); if (IS_RIPNG_DEBUG_ZEBRA) - zlog_debug ("interface down %s index %d flags %ld metric %d mtu %d", - ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu6); + zlog_debug ("interface down %s index %d flags %#llx metric %d mtu %d", + ifp->name, ifp->ifindex, (unsigned long long) ifp->flags, + ifp->metric, ifp->mtu6); return 0; } @@ -291,7 +293,7 @@ ripng_interface_add (int command, struct zclient *zclient, zebra_size_t length) ifp = zebra_interface_add_read (zclient->ibuf); if (IS_RIPNG_DEBUG_ZEBRA) - zlog_debug ("RIPng interface add %s index %d flags %ld metric %d mtu %d", + zlog_debug ("RIPng interface add %s index %d flags %#llx metric %d mtu %d", ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu6); /* Check is this interface is RIP enabled or not.*/ @@ -324,7 +326,7 @@ ripng_interface_delete (int command, struct zclient *zclient, ripng_if_down(ifp); } - zlog_info("interface delete %s index %d flags %ld metric %d mtu %d", + zlog_info("interface delete %s index %d flags %#llx metric %d mtu %d", ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu6); /* To support pseudo interface do not free interface structure. */ |