diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-09-12 09:23:30 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-12 09:23:30 +0300 |
| commit | bf1fa1b2dfeebb4fefcf3655111f30a766b6bc6d (patch) | |
| tree | 9abe8e4dda78e65d1bbe1da041e68ef2525cb05c /zebra/zserv.c | |
| parent | a76a7d1b1266f112f279aef3a544b18409e2ca7a (diff) | |
| parent | e0437aba6d605a41c0471013746e3d9c791ccd20 (diff) | |
Merge pull request #16798 from donaldsharp/zebra_more_vrf_debug_data
zebra: Add more vrf name to debugs
Diffstat (limited to 'zebra/zserv.c')
| -rw-r--r-- | zebra/zserv.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/zebra/zserv.c b/zebra/zserv.c index a731f7f278..07e3996643 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -161,9 +161,11 @@ void zserv_log_message(const char *errmsg, struct stream *msg, if (errmsg) zlog_debug("%s", errmsg); if (hdr) { + struct vrf *vrf = vrf_lookup_by_id(hdr->vrf_id); + zlog_debug(" Length: %d", hdr->length); zlog_debug("Command: %s", zserv_command_string(hdr->command)); - zlog_debug(" VRF: %u", hdr->vrf_id); + zlog_debug(" VRF: %s(%u)", VRF_LOGNAME(vrf), hdr->vrf_id); } stream_hexdump(msg); } @@ -425,11 +427,13 @@ static void zserv_read(struct event *thread) } /* Debug packet information. */ - if (IS_ZEBRA_DEBUG_PACKET) - zlog_debug("zebra message[%s:%u:%u] comes from socket [%d]", + if (IS_ZEBRA_DEBUG_PACKET) { + struct vrf *vrf = vrf_lookup_by_id(hdr.vrf_id); + + zlog_debug("zebra message[%s:%s:%u] comes from socket [%d]", zserv_command_string(hdr.command), - hdr.vrf_id, hdr.length, - sock); + VRF_LOGNAME(vrf), hdr.length, sock); + } stream_set_getp(client->ibuf_work, 0); struct stream *msg = stream_dup(client->ibuf_work); |
