summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2021-01-26 12:29:39 -0500
committerMark Stapp <mjs@voltanet.io>2021-01-26 12:29:39 -0500
commit4c99d413e6461ed169fdb077bba6594d735520df (patch)
tree5fcea58d60333b3b8f9f97bdbe85db2e54dd6180
parent72bd11663fde8f8cf504a4a93bee594df70d7fc7 (diff)
zebra: debug messages go under conditionals
Move a couple of unprotected debug calls in the netlink code under DEBUG_KERNEL. Signed-off-by: Mark Stapp <mjs@voltanet.io>
-rw-r--r--zebra/kernel_netlink.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c
index bbe2fccc60..7d2f9e372d 100644
--- a/zebra/kernel_netlink.c
+++ b/zebra/kernel_netlink.c
@@ -1136,9 +1136,11 @@ static int nl_batch_read_resp(struct nl_batch *bth)
* associated with any dplane context object.
*/
if (ctx == NULL) {
- zlog_debug(
- "%s: skipping unassociated response, seq number %d NS %u",
- __func__, h->nlmsg_seq, bth->zns->ns_id);
+ if (IS_ZEBRA_DEBUG_KERNEL)
+ zlog_debug(
+ "%s: skipping unassociated response, seq number %d NS %u",
+ __func__, h->nlmsg_seq,
+ bth->zns->ns_id);
continue;
}
@@ -1149,8 +1151,9 @@ static int nl_batch_read_resp(struct nl_batch *bth)
dplane_ctx_set_status(
ctx, ZEBRA_DPLANE_REQUEST_FAILURE);
- zlog_debug("%s: netlink error message seq=%d ",
- __func__, h->nlmsg_seq);
+ if (IS_ZEBRA_DEBUG_KERNEL)
+ zlog_debug("%s: netlink error message seq=%d ",
+ __func__, h->nlmsg_seq);
continue;
}
@@ -1159,9 +1162,11 @@ static int nl_batch_read_resp(struct nl_batch *bth)
* the error and instead received some other message in an
* unexpected way.
*/
- zlog_debug("%s: ignoring message type 0x%04x(%s) NS %u",
- __func__, h->nlmsg_type,
- nl_msg_type_to_str(h->nlmsg_type), bth->zns->ns_id);
+ if (IS_ZEBRA_DEBUG_KERNEL)
+ zlog_debug("%s: ignoring message type 0x%04x(%s) NS %u",
+ __func__, h->nlmsg_type,
+ nl_msg_type_to_str(h->nlmsg_type),
+ bth->zns->ns_id);
}
return 0;