Skip to content

Commit dd9ec12

Browse files
cscarpittamergify[bot]
authored andcommitted
zebra: Add missing debug guard in rt netlink code
Guard a debug in the rt netlink code. Signed-off-by: Carmine Scarpitta <[email protected]> (cherry picked from commit d9e8c1e)
1 parent 477ac71 commit dd9ec12

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

zebra/rt_netlink.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,8 +1498,9 @@ int netlink_route_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
14981498

14991499
if (!(h->nlmsg_type == RTM_NEWROUTE || h->nlmsg_type == RTM_DELROUTE)) {
15001500
/* If this is not route add/delete message print warning. */
1501-
zlog_debug("Kernel message: %s NS %u",
1502-
nl_msg_type_to_str(h->nlmsg_type), ns_id);
1501+
if (IS_ZEBRA_DEBUG_KERNEL)
1502+
zlog_debug("Kernel message: %s NS %u", nl_msg_type_to_str(h->nlmsg_type),
1503+
ns_id);
15031504
return 0;
15041505
}
15051506

0 commit comments

Comments
 (0)