From: Philippe Guibert Date: Thu, 1 Mar 2018 14:24:39 +0000 (+0100) Subject: bgpd: disable aggregation for flowspec entries X-Git-Tag: frr-5.0-dev~105^2~11 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=f77af2c3f2ceb982a8eecb5f5fe743707038a67e;p=matthieu%2Ffrr.git bgpd: disable aggregation for flowspec entries Flowspec entries do not need aggregation feature. Actually, all flowspec entries are unique. So, some check is done against aggregate functionalities in the code. Signed-off-by: Philippe Guibert --- diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index a37e709f10..aef3ad6a7b 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -5551,7 +5551,8 @@ void bgp_aggregate_increment(struct bgp *bgp, struct prefix *p, /* MPLS-VPN aggregation is not yet supported. */ if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP) - || (safi == SAFI_EVPN)) + || (safi == SAFI_EVPN) + || (safi == SAFI_FLOWSPEC)) return; table = bgp->aggregate[afi][safi]; @@ -5589,7 +5590,8 @@ void bgp_aggregate_decrement(struct bgp *bgp, struct prefix *p, /* MPLS-VPN aggregation is not yet supported. */ if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP) - || (safi == SAFI_EVPN)) + || (safi == SAFI_EVPN) + || (safi == SAFI_FLOWSPEC)) return; table = bgp->aggregate[afi][safi]; @@ -5817,6 +5819,9 @@ static int bgp_aggregate_unset(struct vty *vty, const char *prefix_str, struct bgp_node *rn; struct bgp_aggregate *aggregate; + if (safi == SAFI_FLOWSPEC) + return CMD_WARNING_CONFIG_FAILED; + /* Convert string to prefix structure. */ ret = str2prefix(prefix_str, &p); if (!ret) { @@ -5860,6 +5865,9 @@ static int bgp_aggregate_set(struct vty *vty, const char *prefix_str, afi_t afi, struct bgp_node *rn; struct bgp_aggregate *aggregate; + if (safi == SAFI_FLOWSPEC) + return CMD_WARNING_CONFIG_FAILED; + /* Convert string to prefix structure. */ ret = str2prefix(prefix_str, &p); if (!ret) {