summaryrefslogtreecommitdiffstats
path: root/pimd
diff options
context:
space:
mode:
authorEverton Marques <everton.marques@gmail.com>2009-11-17 10:17:21 -0200
committerDavid Lamparter <equinox@opensourcerouting.org>2015-02-04 06:07:52 +0100
commite0b8b9b6e465bc8ae4a416e5297fa682d7feb39e (patch)
treef77dad7dd4c532f87a1fad255eabca451d2c5a9c /pimd
parent3466dae420942b3a5b342c95d5667e1927409e8a (diff)
downloadquagga-e0b8b9b6e465bc8ae4a416e5297fa682d7feb39e.tar.bz2
quagga-e0b8b9b6e465bc8ae4a416e5297fa682d7feb39e.tar.xz
[pim] Clean-up log messages
Diffstat (limited to 'pimd')
-rw-r--r--pimd/pim_hello.c2
-rw-r--r--pimd/pim_neighbor.c51
2 files changed, 26 insertions, 27 deletions
diff --git a/pimd/pim_hello.c b/pimd/pim_hello.c
index 8b710b8c..545b3b12 100644
--- a/pimd/pim_hello.c
+++ b/pimd/pim_hello.c
@@ -197,7 +197,7 @@ int pim_hello_recv(struct interface *ifp,
if ((tlv_curr + option_len) > tlv_pastend) {
char src_str[100];
pim_inet4_dump("<src?>", src_addr, src_str, sizeof(src_str));
- zlog_warn("%s: long PIM hello TLV type=%d length=%d > max=%d from %s on interface %s",
+ zlog_warn("%s: long PIM hello TLV type=%d length=%d > left=%d from %s on interface %s",
__PRETTY_FUNCTION__,
option_type, option_len, tlv_pastend - tlv_curr,
src_str, ifp->name);
diff --git a/pimd/pim_neighbor.c b/pimd/pim_neighbor.c
index b4112edf..9013b50c 100644
--- a/pimd/pim_neighbor.c
+++ b/pimd/pim_neighbor.c
@@ -46,9 +46,11 @@ static void dr_election_by_addr(struct interface *ifp)
pim_ifp->pim_dr_addr = pim_ifp->primary_address;
- zlog_info("%s on interface %s",
- __PRETTY_FUNCTION__,
- ifp->name);
+ if (PIM_DEBUG_PIM_TRACE) {
+ zlog_debug("%s: on interface %s",
+ __PRETTY_FUNCTION__,
+ ifp->name);
+ }
for (ALL_LIST_ELEMENTS_RO(pim_ifp->pim_neighbor_list, node, neigh)) {
if (ntohl(neigh->source_addr.s_addr) > ntohl(pim_ifp->pim_dr_addr.s_addr)) {
@@ -70,15 +72,20 @@ static void dr_election_by_pri(struct interface *ifp)
pim_ifp->pim_dr_addr = pim_ifp->primary_address;
dr_pri = pim_ifp->pim_dr_priority;
- zlog_info("%s: dr pri %u on interface %s",
- __PRETTY_FUNCTION__,
- dr_pri, ifp->name);
-
+ if (PIM_DEBUG_PIM_TRACE) {
+ zlog_debug("%s: dr pri %u on interface %s",
+ __PRETTY_FUNCTION__,
+ dr_pri, ifp->name);
+ }
for (ALL_LIST_ELEMENTS_RO(pim_ifp->pim_neighbor_list, node, neigh)) {
- zlog_info("%s: neigh pri %u addr %x if dr addr %x",
- __PRETTY_FUNCTION__,
- neigh->dr_priority, ntohl(neigh->source_addr.s_addr) , ntohl(pim_ifp->pim_dr_addr.s_addr) );
+ if (PIM_DEBUG_PIM_TRACE) {
+ zlog_info("%s: neigh pri %u addr %x if dr addr %x",
+ __PRETTY_FUNCTION__,
+ neigh->dr_priority,
+ ntohl(neigh->source_addr.s_addr),
+ ntohl(pim_ifp->pim_dr_addr.s_addr));
+ }
if (
(neigh->dr_priority > dr_pri) ||
(
@@ -103,8 +110,6 @@ void pim_if_dr_election(struct interface *ifp)
{
struct pim_interface *pim_ifp = ifp->info;
struct in_addr old_dr_addr;
- char dr_old_str[100];
- char dr_new_str[100];
pim_ifp->pim_dr_election_last = pim_time_monotonic_sec(); /* timestamp */
++pim_ifp->pim_dr_election_count;
@@ -118,22 +123,16 @@ void pim_if_dr_election(struct interface *ifp)
dr_election_by_pri(ifp);
}
- pim_inet4_dump("<old_dr?>", old_dr_addr, dr_old_str, sizeof(dr_old_str));
- pim_inet4_dump("<new_dr?>", pim_ifp->pim_dr_addr, dr_new_str, sizeof(dr_new_str));
- zlog_info("%s: DR was %s now is %s on interface %s",
- __PRETTY_FUNCTION__,
- dr_old_str, dr_new_str, ifp->name);
-
/* DR changed ? */
if (old_dr_addr.s_addr != pim_ifp->pim_dr_addr.s_addr) {
- /* char dr_old_str[100]; */
- /* char dr_new_str[100]; */
- /* pim_inet4_dump("<old_dr?>", old_dr_addr, dr_old_str, sizeof(dr_old_str)); */
- /* pim_inet4_dump("<new_dr?>", pim_ifp->pim_dr_addr, dr_new_str, sizeof(dr_new_str)); */
- /* zlog_info("%s: DR was %s now is %s on interface %s", */
- /* __PRETTY_FUNCTION__, */
- /* dr_old_str, dr_new_str, ifp->name); */
-
+ char dr_old_str[100];
+ char dr_new_str[100];
+ pim_inet4_dump("<old_dr?>", old_dr_addr, dr_old_str, sizeof(dr_old_str));
+ pim_inet4_dump("<new_dr?>", pim_ifp->pim_dr_addr, dr_new_str, sizeof(dr_new_str));
+ zlog_info("%s: DR was %s now is %s on interface %s",
+ __PRETTY_FUNCTION__,
+ dr_old_str, dr_new_str, ifp->name);
+
pim_if_update_join_desired(pim_ifp);
pim_if_update_could_assert(ifp);
pim_if_update_assert_tracking_desired(ifp);