summaryrefslogtreecommitdiffstats
path: root/ldpd/ldp_debug.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-09-12 14:52:20 +0200
committerRenato Westphal <renato@opensourcerouting.org>2017-09-12 16:10:15 +0200
commit08e4b244515682d2adb779a429615034f4956262 (patch)
tree30b9a7625c3b4b284f4bbb4777bf1b2b3b19d4e8 /ldpd/ldp_debug.h
parentldpd: fix broken label allocation (diff)
downloadfrr-08e4b244515682d2adb779a429615034f4956262.tar.xz
frr-08e4b244515682d2adb779a429615034f4956262.zip
ldpd: guard the label allocation debug messages
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/ldp_debug.h')
-rw-r--r--ldpd/ldp_debug.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/ldpd/ldp_debug.h b/ldpd/ldp_debug.h
index 4b9165685..a0972cea8 100644
--- a/ldpd/ldp_debug.h
+++ b/ldpd/ldp_debug.h
@@ -31,6 +31,9 @@ struct ldp_debug {
int event;
#define LDP_DEBUG_EVENT 0x01
+ int labels;
+#define LDP_DEBUG_LABELS 0x01
+
int msg;
#define LDP_DEBUG_MSG_RECV 0x01
#define LDP_DEBUG_MSG_RECV_ALL 0x02
@@ -90,6 +93,12 @@ do { \
log_debug("event: " emsg, __VA_ARGS__); \
} while (0)
+#define debug_labels(emsg, ...) \
+do { \
+ if (LDP_DEBUG(labels, LABELS)) \
+ log_debug("labels: " emsg, __VA_ARGS__); \
+} while (0)
+
#define debug_msg_recv(emsg, ...) \
do { \
if (LDP_DEBUG(msg, MSG_RECV)) \