Permalink
Browse files

Merge pull request #3770 from donaldsharp/detailed_debugs

zebra: Update zserv debug messages to give a bit more useful info
  • Loading branch information...
eqvinox committed Feb 11, 2019
2 parents 233c5ed + 494247b commit fb85ce1b812d892a07a4f942b4cfade9442b9a2b
Showing with 10 additions and 3 deletions.
  1. +4 −0 tests/topotests/ospf-topo1-vrf/r1/zebra.conf
  2. +6 −3 zebra/zserv.c
@@ -1,3 +1,7 @@
debug zebra kernel
debug zebra dplane detail
debug zebra rib
debug zebra event
!
hostname r1
password zebra
@@ -405,8 +405,10 @@ static int zserv_read(struct thread *thread)
}

/* Debug packet information. */
if (IS_ZEBRA_DEBUG_EVENT)
zlog_debug("zebra message comes from socket [%d]",
if (IS_ZEBRA_DEBUG_PACKET)
zlog_debug("zebra message[%s:%u:%u] comes from socket [%d]",
zserv_command_string(hdr.command),
hdr.vrf_id, hdr.length,
sock);

if (IS_ZEBRA_DEBUG_PACKET && IS_ZEBRA_DEBUG_RECV)
@@ -442,7 +444,8 @@ static int zserv_read(struct thread *thread)
}

if (IS_ZEBRA_DEBUG_PACKET)
zlog_debug("Read %d packets", p2p_orig - p2p);
zlog_debug("Read %d packets from client: %s", p2p_orig - p2p,
zebra_route_string(client->proto));

/* Reschedule ourselves */
zserv_client_event(client, ZSERV_CLIENT_READ);

0 comments on commit fb85ce1

Please sign in to comment.