summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2018-03-01 15:24:39 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2018-03-30 14:00:47 +0200
commitf77af2c3f2ceb982a8eecb5f5fe743707038a67e (patch)
tree0de62f2fa51153491c2b615b03356aedbd98c51d /bgpd
parentbgpd: add flowspec feature (diff)
downloadfrr-f77af2c3f2ceb982a8eecb5f5fe743707038a67e.tar.xz
frr-f77af2c3f2ceb982a8eecb5f5fe743707038a67e.zip
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 <philippe.guibert@6wind.com>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_route.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index a37e709f1..aef3ad6a7 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) {