mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 22:03:12 +00:00
ospfd: Set filter to unbound debug logs
Ticket:CM-19213 Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
This commit is contained in:
parent
ff99c5b2bb
commit
05ba78e4d9
@ -679,8 +679,9 @@ static int ospf_ase_calculate_timer(struct thread *t)
|
|||||||
|
|
||||||
monotime(&stop_time);
|
monotime(&stop_time);
|
||||||
|
|
||||||
zlog_info("SPF Processing Time(usecs): External Routes: %lld\n",
|
if (IS_DEBUG_OSPF_EVENT)
|
||||||
(stop_time.tv_sec - start_time.tv_sec) * 1000000LL
|
zlog_info("SPF Processing Time(usecs): External Routes: %lld\n",
|
||||||
|
(stop_time.tv_sec - start_time.tv_sec) * 1000000LL
|
||||||
+ (stop_time.tv_usec - start_time.tv_usec));
|
+ (stop_time.tv_usec - start_time.tv_usec));
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include "ospfd/ospf_lsdb.h"
|
#include "ospfd/ospf_lsdb.h"
|
||||||
#include "ospfd/ospf_neighbor.h"
|
#include "ospfd/ospf_neighbor.h"
|
||||||
#include "ospfd/ospf_packet.h"
|
#include "ospfd/ospf_packet.h"
|
||||||
|
#include "ospfd/ospf_dump.h"
|
||||||
|
|
||||||
/* Join to the OSPF ALL SPF ROUTERS multicast group. */
|
/* Join to the OSPF ALL SPF ROUTERS multicast group. */
|
||||||
int ospf_if_add_allspfrouters(struct ospf *top, struct prefix *p,
|
int ospf_if_add_allspfrouters(struct ospf *top, struct prefix *p,
|
||||||
@ -56,10 +56,11 @@ int ospf_if_add_allspfrouters(struct ospf *top, struct prefix *p,
|
|||||||
"on # of multicast group memberships has been exceeded?",
|
"on # of multicast group memberships has been exceeded?",
|
||||||
top->fd, inet_ntoa(p->u.prefix4), ifindex,
|
top->fd, inet_ntoa(p->u.prefix4), ifindex,
|
||||||
safe_strerror(errno));
|
safe_strerror(errno));
|
||||||
else
|
else {
|
||||||
zlog_debug(
|
if (IS_DEBUG_OSPF_EVENT)
|
||||||
"interface %s [%u] join AllSPFRouters Multicast group.",
|
zlog_debug("interface %s [%u] join AllSPFRouters Multicast group.",
|
||||||
inet_ntoa(p->u.prefix4), ifindex);
|
inet_ntoa(p->u.prefix4), ifindex);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -78,10 +79,11 @@ int ospf_if_drop_allspfrouters(struct ospf *top, struct prefix *p,
|
|||||||
"ifindex %u, AllSPFRouters): %s",
|
"ifindex %u, AllSPFRouters): %s",
|
||||||
top->fd, inet_ntoa(p->u.prefix4), ifindex,
|
top->fd, inet_ntoa(p->u.prefix4), ifindex,
|
||||||
safe_strerror(errno));
|
safe_strerror(errno));
|
||||||
else
|
else {
|
||||||
zlog_debug(
|
if (IS_DEBUG_OSPF_EVENT)
|
||||||
"interface %s [%u] leave AllSPFRouters Multicast group.",
|
zlog_debug("interface %s [%u] leave AllSPFRouters Multicast group.",
|
||||||
inet_ntoa(p->u.prefix4), ifindex);
|
inet_ntoa(p->u.prefix4), ifindex);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -702,12 +702,12 @@ static void nsm_change_state(struct ospf_neighbor *nbr, int state)
|
|||||||
oi->ospf);
|
oi->ospf);
|
||||||
}
|
}
|
||||||
|
|
||||||
zlog_info(
|
if (CHECK_FLAG(oi->ospf->config, OSPF_LOG_ADJACENCY_DETAIL))
|
||||||
"nsm_change_state(%s, %s -> %s): "
|
zlog_info("%s:(%s, %s -> %s): "
|
||||||
"scheduling new router-LSA origination",
|
"scheduling new router-LSA origination",
|
||||||
inet_ntoa(nbr->router_id),
|
__PRETTY_FUNCTION__, inet_ntoa(nbr->router_id),
|
||||||
lookup_msg(ospf_nsm_state_msg, old_state, NULL),
|
lookup_msg(ospf_nsm_state_msg, old_state, NULL),
|
||||||
lookup_msg(ospf_nsm_state_msg, state, NULL));
|
lookup_msg(ospf_nsm_state_msg, state, NULL));
|
||||||
|
|
||||||
ospf_router_lsa_update_area(oi->area);
|
ospf_router_lsa_update_area(oi->area);
|
||||||
|
|
||||||
|
@ -1363,9 +1363,11 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,
|
|||||||
if (IPV4_ADDR_CMP(&nbr->router_id, &oi->ospf->router_id)
|
if (IPV4_ADDR_CMP(&nbr->router_id, &oi->ospf->router_id)
|
||||||
> 0) {
|
> 0) {
|
||||||
/* We're Slave---obey */
|
/* We're Slave---obey */
|
||||||
zlog_info(
|
if (CHECK_FLAG(oi->ospf->config,
|
||||||
"Packet[DD]: Neighbor %s Negotiation done (Slave).",
|
OSPF_LOG_ADJACENCY_DETAIL))
|
||||||
inet_ntoa(nbr->router_id));
|
zlog_info("Packet[DD]: Neighbor %s Negotiation done (Slave).",
|
||||||
|
inet_ntoa(nbr->router_id));
|
||||||
|
|
||||||
nbr->dd_seqnum = ntohl(dd->dd_seqnum);
|
nbr->dd_seqnum = ntohl(dd->dd_seqnum);
|
||||||
|
|
||||||
/* Reset I/MS */
|
/* Reset I/MS */
|
||||||
@ -1374,10 +1376,12 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,
|
|||||||
} else {
|
} else {
|
||||||
/* We're Master, ignore the initial DBD from
|
/* We're Master, ignore the initial DBD from
|
||||||
* Slave */
|
* Slave */
|
||||||
zlog_info(
|
if (CHECK_FLAG(oi->ospf->config,
|
||||||
"Packet[DD]: Neighbor %s: Initial DBD from Slave, "
|
OSPF_LOG_ADJACENCY_DETAIL))
|
||||||
"ignoring.",
|
zlog_info(
|
||||||
inet_ntoa(nbr->router_id));
|
"Packet[DD]: Neighbor %s: Initial DBD from Slave, "
|
||||||
|
"ignoring.",
|
||||||
|
inet_ntoa(nbr->router_id));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2589,8 +2589,9 @@ static void ospfTrapNbrStateChange(struct ospf_neighbor *on)
|
|||||||
char msgbuf[16];
|
char msgbuf[16];
|
||||||
|
|
||||||
ospf_nbr_state_message(on, msgbuf, sizeof(msgbuf));
|
ospf_nbr_state_message(on, msgbuf, sizeof(msgbuf));
|
||||||
zlog_info("ospfTrapNbrStateChange trap sent: %s now %s",
|
if (IS_DEBUG_OSPF_EVENT)
|
||||||
inet_ntoa(on->address.u.prefix4), msgbuf);
|
zlog_info("%s: trap sent: %s now %s", __PRETTY_FUNCTION__,
|
||||||
|
inet_ntoa(on->address.u.prefix4), msgbuf);
|
||||||
|
|
||||||
oid_copy_addr(index, &(on->address.u.prefix4), IN_ADDR_SIZE);
|
oid_copy_addr(index, &(on->address.u.prefix4), IN_ADDR_SIZE);
|
||||||
index[IN_ADDR_SIZE] = 0;
|
index[IN_ADDR_SIZE] = 0;
|
||||||
@ -2646,9 +2647,10 @@ static void ospfTrapIfStateChange(struct ospf_interface *oi)
|
|||||||
{
|
{
|
||||||
oid index[sizeof(oid) * (IN_ADDR_SIZE + 1)];
|
oid index[sizeof(oid) * (IN_ADDR_SIZE + 1)];
|
||||||
|
|
||||||
zlog_info("ospfTrapIfStateChange trap sent: %s now %s",
|
if (IS_DEBUG_OSPF_EVENT)
|
||||||
inet_ntoa(oi->address->u.prefix4),
|
zlog_info("%s: trap sent: %s now %s", __PRETTY_FUNCTION__,
|
||||||
lookup_msg(ospf_ism_state_msg, oi->state, NULL));
|
inet_ntoa(oi->address->u.prefix4),
|
||||||
|
lookup_msg(ospf_ism_state_msg, oi->state, NULL));
|
||||||
|
|
||||||
oid_copy_addr(index, &(oi->address->u.prefix4), IN_ADDR_SIZE);
|
oid_copy_addr(index, &(oi->address->u.prefix4), IN_ADDR_SIZE);
|
||||||
index[IN_ADDR_SIZE] = 0;
|
index[IN_ADDR_SIZE] = 0;
|
||||||
|
@ -1463,9 +1463,7 @@ void ospf_spf_calculate_schedule(struct ospf *ospf, ospf_spf_reason_t reason)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (IS_DEBUG_OSPF_EVENT)
|
if (IS_DEBUG_OSPF_EVENT)
|
||||||
zlog_debug("SPF: calculation timer delay = %ld", delay);
|
zlog_debug("SPF: calculation timer delay = %ld msec", delay);
|
||||||
|
|
||||||
zlog_info("SPF: Scheduled in %ld msec", delay);
|
|
||||||
|
|
||||||
ospf->t_spf_calc = NULL;
|
ospf->t_spf_calc = NULL;
|
||||||
thread_add_timer_msec(master, ospf_spf_calculate_timer, ospf, delay,
|
thread_add_timer_msec(master, ospf_spf_calculate_timer, ospf, delay,
|
||||||
|
Loading…
Reference in New Issue
Block a user