From 3940453ad29e9f966cb2e5d7c5fb9faaafd15389 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Tue, 9 Aug 2022 14:04:48 -0700 Subject: [PATCH] monitor: print out type of unknown element This changes the string from "Reserved" to "Unknown" which feels more fitting, and also prints out the NL type of the unknown element. --- monitor/nlmon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monitor/nlmon.c b/monitor/nlmon.c index 372af954..2432cb95 100644 --- a/monitor/nlmon.c +++ b/monitor/nlmon.c @@ -6741,7 +6741,7 @@ static void print_attributes(int indent, const struct attr_entry *table, int64_t val_s64; uint8_t *ptr; - str = "Reserved"; + str = "Unknown"; type = ATTR_UNSPEC; array_type = ATTR_UNSPEC; nested = NULL; @@ -6761,7 +6761,7 @@ static void print_attributes(int indent, const struct attr_entry *table, switch (type) { case ATTR_UNSPEC: - print_attr(indent, "%s: len %u", str, + print_attr(indent, "%s: %u len %u", str, nla_type, NLA_PAYLOAD(nla)); print_hexdump(indent + 1, NLA_DATA(nla), NLA_PAYLOAD(nla));