]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: fix debug message config write
authorIgor Ryzhov <iryzhov@nfware.com>
Wed, 26 May 2021 08:48:09 +0000 (11:48 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Thu, 27 May 2021 10:20:23 +0000 (13:20 +0300)
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>
ospf6d/ospf6_message.c

index d2dcfd81d4e31d92a8d0f138bbdb249a85bf7e60..f83be7b49caaec9c124937283a302c2d9ed54730 100644 (file)
@@ -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;