summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_message.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-05-26 10:48:09 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2021-05-26 10:48:09 +0200
commitc9ac777a7ebde6ebf0f48d4d081907871a1c3cef (patch)
treee1e724ad6da6447f5aef0b400b6b8870a12389e1 /ospf6d/ospf6_message.c
parentospf6d: fix invalid "no debug ospf6 message unknown" (diff)
downloadfrr-c9ac777a7ebde6ebf0f48d4d081907871a1c3cef.tar.xz
frr-c9ac777a7ebde6ebf0f48d4d081907871a1c3cef.zip
ospf6d: fix debug message config write
Fix the following issues: - if "send" is combined with "recv-hdr", only "send" is shown - if "recv" is combined with "send-hdr", only "recv" is shown - if both "send-hdr" and "recv-hdr" are enabled, "; header only" is shown Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to '')
-rw-r--r--ospf6d/ospf6_message.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c
index d2dcfd81d..f83be7b49 100644
--- a/ospf6d/ospf6_message.c
+++ b/ospf6d/ospf6_message.c
@@ -2669,24 +2669,24 @@ int config_write_ospf6_debug_message(struct vty *vty)
for (i = 1; i < 6; i++) {
if (IS_OSPF6_DEBUG_MESSAGE_ENABLED(i, SEND)
- && IS_OSPF6_DEBUG_MESSAGE_ENABLED(i, RECV))
+ && IS_OSPF6_DEBUG_MESSAGE_ENABLED(i, RECV)) {
vty_out(vty, "debug ospf6 message %s\n", type_str[i]);
- else if (IS_OSPF6_DEBUG_MESSAGE_ENABLED(i, SEND))
+ continue;
+ }
+
+ if (IS_OSPF6_DEBUG_MESSAGE_ENABLED(i, SEND))
vty_out(vty, "debug ospf6 message %s send\n",
type_str[i]);
- else if (IS_OSPF6_DEBUG_MESSAGE_ENABLED(i, RECV))
- vty_out(vty, "debug ospf6 message %s recv\n",
+ else if (IS_OSPF6_DEBUG_MESSAGE_ENABLED(i, SEND_HDR))
+ vty_out(vty, "debug ospf6 message %s send-hdr\n",
type_str[i]);
- else if (IS_OSPF6_DEBUG_MESSAGE_ENABLED(i, SEND_HDR)
- && IS_OSPF6_DEBUG_MESSAGE_ENABLED(i, RECV_HDR))
- vty_out(vty, "debug ospf6 message %s; header only\n",
+
+ if (IS_OSPF6_DEBUG_MESSAGE_ENABLED(i, RECV))
+ vty_out(vty, "debug ospf6 message %s recv\n",
type_str[i]);
else if (IS_OSPF6_DEBUG_MESSAGE_ENABLED(i, RECV_HDR))
vty_out(vty, "debug ospf6 message %s recv-hdr\n",
type_str[i]);
- else if (IS_OSPF6_DEBUG_MESSAGE_ENABLED(i, SEND_HDR))
- vty_out(vty, "debug ospf6 message %s send-hdr\n",
- type_str[i]);
}
return 0;