summaryrefslogtreecommitdiff
path: root/pimd/pim_vty.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-04-25 13:53:17 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2022-04-26 10:49:03 +0200
commit92fed03c3d91da24735017c571ef47a5459d03b8 (patch)
tree33b18fdea2a74d8a54d408a43ce5d7ec9c2deb20 /pimd/pim_vty.c
parentd45a846e5ca313e5ab132ef57c495cc0407b50d9 (diff)
pimd: fix reversed logic for "debug ... detail"
The normal flag was enabling detail messages, but what we want is the detail flag enabling normal messages. Remove the _ONLY macro while at it, it's only used for config print & that seems like a place where making the difference explicitly visible is helpful regardless. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_vty.c')
-rw-r--r--pimd/pim_vty.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c
index b0db6b4d96..4a02ebb09b 100644
--- a/pimd/pim_vty.c
+++ b/pimd/pim_vty.c
@@ -70,18 +70,18 @@ int pim_debug_config_write(struct vty *vty)
++writes;
}
- if (PIM_DEBUG_MROUTE) {
+ /* PIM_DEBUG_MROUTE catches _DETAIL too */
+ if (router->debugs & PIM_MASK_MROUTE) {
vty_out(vty, "debug mroute\n");
++writes;
}
-
- if (PIM_DEBUG_MTRACE) {
- vty_out(vty, "debug mtrace\n");
+ if (PIM_DEBUG_MROUTE_DETAIL) {
+ vty_out(vty, "debug mroute detail\n");
++writes;
}
- if (PIM_DEBUG_MROUTE_DETAIL_ONLY) {
- vty_out(vty, "debug mroute detail\n");
+ if (PIM_DEBUG_MTRACE) {
+ vty_out(vty, "debug mtrace\n");
++writes;
}
@@ -102,11 +102,12 @@ int pim_debug_config_write(struct vty *vty)
++writes;
}
- if (PIM_DEBUG_PIM_TRACE) {
+ /* PIM_DEBUG_PIM_TRACE catches _DETAIL too */
+ if (router->debugs & PIM_MASK_PIM_TRACE) {
vty_out(vty, "debug pim trace\n");
++writes;
}
- if (PIM_DEBUG_PIM_TRACE_DETAIL_ONLY) {
+ if (PIM_DEBUG_PIM_TRACE_DETAIL) {
vty_out(vty, "debug pim trace detail\n");
++writes;
}