]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: fix invalid "no debug ospf6 message unknown"
authorIgor Ryzhov <iryzhov@nfware.com>
Wed, 26 May 2021 08:45:07 +0000 (11:45 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Thu, 27 May 2021 10:20:15 +0000 (13:20 +0300)
The message is always shown in the config, because IS_OSPF6_DEBUG_MESSAGE
works incorrectly when negated because of missing outer brackets.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
ospf6d/ospf6_message.h

index c4cdbd52f4b16e2236cc2c79cfdc121f0c4ba438..7c108bd452ae7bc26a39191797e7ba60ba01dd4a 100644 (file)
@@ -42,14 +42,14 @@ extern unsigned char conf_debug_ospf6_message[];
        (conf_debug_ospf6_message[type] &= ~(level))
 
 #define IS_OSPF6_DEBUG_MESSAGE(t, e)                                           \
-       ((OSPF6_DEBUG_MESSAGE_##e) == OSPF6_DEBUG_MESSAGE_RECV_HDR)            \
+       (((OSPF6_DEBUG_MESSAGE_##e) == OSPF6_DEBUG_MESSAGE_RECV_HDR)           \
                ? (conf_debug_ospf6_message[t]                                 \
                   & (OSPF6_DEBUG_MESSAGE_RECV_BOTH))                          \
                : (((OSPF6_DEBUG_MESSAGE_##e) == OSPF6_DEBUG_MESSAGE_SEND_HDR) \
                           ? (conf_debug_ospf6_message[t]                      \
                              & (OSPF6_DEBUG_MESSAGE_SEND_BOTH))               \
                           : (conf_debug_ospf6_message[t]                      \
-                             & (OSPF6_DEBUG_MESSAGE_##e)))
+                             & (OSPF6_DEBUG_MESSAGE_##e))))
 
 #define IS_OSPF6_DEBUG_MESSAGE_ENABLED(type, e)                                \
        (conf_debug_ospf6_message[type] & (OSPF6_DEBUG_MESSAGE_##e))