From 0081ab91e6d192f87df0a1797ec2108e594d7c8e Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 24 Mar 2022 18:31:23 -0400 Subject: [PATCH] zebra: When handling unprocessed messages from kernel print usable string Add new debug output to show the string of the message type that is currently unhandled: 2022-03-24 18:30:15.284 [DEBG] zebra: [V3NSB-BPKBD] Kernel: 2022-03-24 18:30:15.284 [DEBG] zebra: [HDTM1-ENZNM] Kernel: message seq 792 2022-03-24 18:30:15.284 [DEBG] zebra: [MJD4M-0AAAR] Kernel: pid 594488, rtm_addrs {DST,GENMASK} 2022-03-24 18:30:15.285 [DEBG] zebra: [GRDRZ-0N92S] Unprocessed RTM_type: RTM_NEWMADDR(d) Signed-off-by: Donald Sharp --- zebra/kernel_socket.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index 6583af0a54..420e41e394 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -159,6 +159,9 @@ const struct message rtm_type_str[] = {{RTM_ADD, "RTM_ADD"}, #ifdef RTM_IFANNOUNCE {RTM_IFANNOUNCE, "RTM_IFANNOUNCE"}, #endif /* RTM_IFANNOUNCE */ +#ifdef RTM_IEEE80211 + {RTM_IEEE80211, "RTM_IEEE80211"}, +#endif {0}}; static const struct message rtm_flag_str[] = {{RTF_UP, "UP"}, @@ -1405,7 +1408,10 @@ static void kernel_read(struct thread *thread) #endif /* RTM_IFANNOUNCE */ default: if (IS_ZEBRA_DEBUG_KERNEL) - zlog_debug("Unprocessed RTM_type: %d", rtm->rtm_type); + zlog_debug( + "Unprocessed RTM_type: %s(%d)", + lookup_msg(rtm_type_str, rtm->rtm_type, NULL), + rtm->rtm_type); break; } } -- 2.39.5