if (aspath_loop_check(attr->aspath, peer->change_local_as)
> aspath_loop_count) {
+ peer->stat_pfx_aspath_loop++;
reason = "as-path contains our own AS;";
goto filtered;
}
|| (CHECK_FLAG(bgp->config, BGP_CONFIG_CONFEDERATION)
&& aspath_loop_check(attr->aspath, bgp->confed_id)
> peer->allowas_in[afi][safi])) {
+ peer->stat_pfx_aspath_loop++;
reason = "as-path contains our own AS;";
goto filtered;
}
/* Route reflector originator ID check. */
if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_ORIGINATOR_ID)
&& IPV4_ADDR_SAME(&bgp->router_id, &attr->originator_id)) {
+ peer->stat_pfx_originator_loop++;
reason = "originator is us;";
goto filtered;
}
/* Route reflector cluster ID check. */
if (bgp_cluster_filter(peer, attr)) {
+ peer->stat_pfx_cluster_loop++;
reason = "reflected from the same cluster;";
goto filtered;
}
/* Apply incoming filter. */
if (bgp_input_filter(peer, p, attr, afi, safi) == FILTER_DENY) {
+ peer->stat_pfx_filter++;
reason = "filter;";
goto filtered;
}
* the attr (which takes over the memory references) */
if (bgp_input_modifier(peer, p, &new_attr, afi, safi, NULL)
== RMAP_DENY) {
+ peer->stat_pfx_filter++;
reason = "route-map;";
bgp_attr_flush(&new_attr);
goto filtered;
/* next hop check. */
if (!CHECK_FLAG(peer->flags, PEER_FLAG_IS_RFAPI_HD)
&& bgp_update_martian_nexthop(bgp, afi, safi, &new_attr)) {
+ peer->stat_pfx_nh_invalid++;
reason = "martian or self next-hop;";
bgp_attr_flush(&new_attr);
goto filtered;
}
if (bgp_mac_entry_exists(p) || bgp_mac_exist(&attr->rmac)) {
+ peer->stat_pfx_nh_invalid++;
reason = "self mac;";
goto filtered;
}
if (CHECK_FLAG(peer->af_flags[afi][safi], PEER_FLAG_SOFT_RECONFIG)
&& peer != bgp->peer_self)
if (!bgp_adj_in_unset(rn, peer, addpath_id)) {
+ peer->stat_pfx_dup_withdraw++;
+
if (bgp_debug_update(peer, p, NULL, 1)) {
bgp_debug_rdpfxpath2str(
afi, safi, prd, p, label, num_labels,
_Atomic uint32_t dynamic_cap_in; /* Dynamic Capability input count. */
_Atomic uint32_t dynamic_cap_out; /* Dynamic Capability output count. */
+ uint32_t stat_pfx_filter;
+ uint32_t stat_pfx_aspath_loop;
+ uint32_t stat_pfx_originator_loop;
+ uint32_t stat_pfx_cluster_loop;
+ uint32_t stat_pfx_nh_invalid;
+ uint32_t stat_pfx_dup_withdraw;
+ uint32_t stat_upd_7606; /* RFC7606: treat-as-withdraw */
+
/* BGP state count */
uint32_t established; /* Established */
uint32_t dropped; /* Dropped */