From 15e78e64b41f166ad2176977b6c6eb4d698344e0 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 28 Nov 2022 08:53:20 -0500 Subject: [PATCH] ospfd: Do not always debug joining AllDRouters Multicast group My log file is filling up with: 2022-11-26 13:24:47.532 [DEBG] ospfd: [RY794-DQ7AK] interface 192.168.119.229 [2] join AllDRouters Multicast group. Every 1/2 hour. There is nothing an operator needs to do here and nothing that they can change. Let's guard this output. Signed-off-by: Donald Sharp --- ospfd/ospf_network.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ospfd/ospf_network.c b/ospfd/ospf_network.c index be06afe532..a8c9493ec8 100644 --- a/ospfd/ospf_network.c +++ b/ospfd/ospf_network.c @@ -104,11 +104,12 @@ int ospf_if_add_alldrouters(struct ospf *top, struct prefix *p, "can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %pI4, ifindex %u, AllDRouters): %s; perhaps a kernel limit on # of multicast group memberships has been exceeded?", top->fd, &p->u.prefix4, ifindex, safe_strerror(errno)); - else - zlog_debug( - "interface %pI4 [%u] join AllDRouters Multicast group.", - &p->u.prefix4, ifindex); - + else { + if (IS_DEBUG_OSPF_EVENT) + zlog_debug( + "interface %pI4 [%u] join AllDRouters Multicast group.", + &p->u.prefix4, ifindex); + } return ret; } -- 2.39.5