]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: disable aggregation for flowspec entries
authorPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 1 Mar 2018 14:24:39 +0000 (15:24 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 30 Mar 2018 12:00:47 +0000 (14:00 +0200)
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 <philippe.guibert@6wind.com>
bgpd/bgp_route.c

index a37e709f10b33d30aff63815cc3f5a1833eccd8f..aef3ad6a7b55183f98f6cde5864b7ff9b8c056af 100644 (file)
@@ -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) {