summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-03-24 18:31:23 -0400
committerDonald Sharp <sharpd@nvidia.com>2022-03-24 20:07:00 -0400
commit0081ab91e6d192f87df0a1797ec2108e594d7c8e (patch)
tree90598c86cb53fb5ae05b422a95046d7aff1c55f1
parent113f966512a0a6572035c76001d5db4b223bf356 (diff)
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 <sharpd@nvidia.com>
-rw-r--r--zebra/kernel_socket.c8
1 files changed, 7 insertions, 1 deletions
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;
}
}