diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c index 67bcab8eeda2..074230737fd6 100644 --- a/pimd/pim_msdp.c +++ b/pimd/pim_msdp.c @@ -724,6 +724,8 @@ bool pim_msdp_peer_rpf_check(struct pim_msdp_peer *mp, struct in_addr rp) if (pim_msdp_log_sa_events(mp->pim)) zlog_info("MSDP peer %pI4 RPF failure for %pI4", &mp->peer, &rp); + mp->rpf_lookup_failure_count++; + return false; } diff --git a/pimd/pim_msdp.h b/pimd/pim_msdp.h index 33af2d0b6be8..6bfa041fc337 100644 --- a/pimd/pim_msdp.h +++ b/pimd/pim_msdp.h @@ -148,10 +148,18 @@ struct pim_msdp_peer { /* timestamps */ int64_t uptime; + /** RPF lookup failures count. */ + uint32_t rpf_lookup_failure_count; + /** SA input access list name. */ char *acl_in; + /** Number of input filtered SAs. */ + uint32_t acl_in_count; + /** SA output access list name. */ char *acl_out; + /** Number of output filtered SAs. */ + uint32_t acl_out_count; /** SA maximum amount. */ uint32_t sa_limit; diff --git a/pimd/pim_msdp_packet.c b/pimd/pim_msdp_packet.c index 8c821cb5e548..17c71010862c 100644 --- a/pimd/pim_msdp_packet.c +++ b/pimd/pim_msdp_packet.c @@ -436,6 +436,7 @@ static void pim_msdp_pkt_sa_gen(struct pim_instance *pim, if (pim_msdp_log_sa_events(pim)) zlog_info("MSDP peer %pI4 filter SA out %s", &mp->peer, sa->sg_str); + mp->acl_out_count++; continue; } @@ -498,6 +499,7 @@ void pim_msdp_pkt_sa_tx_one(struct pim_msdp_sa *sa) if (pim_msdp_log_sa_events(sa->pim)) zlog_info("MSDP peer %pI4 filter SA out %s", &mp->peer, sa->sg_str); + mp->acl_out_count++; continue; } @@ -531,6 +533,7 @@ void pim_msdp_pkt_sa_tx_one_to_one_peer(struct pim_msdp_peer *mp, zlog_info("MSDP peer %pI4 filter SA out (%pI4, %pI4)", &mp->peer, &sa.sg.src, &sa.sg.grp); + mp->acl_out_count++; return; } @@ -590,6 +593,8 @@ static void pim_msdp_pkt_sa_rx_one(struct pim_msdp_peer *mp, struct in_addr rp) if (pim_msdp_log_sa_events(mp->pim)) zlog_info("MSDP peer %pI4 filter SA in (%pI4, %pI4)", &mp->peer, &sg.src, &sg.grp); + + mp->acl_in_count++; return; } }