summaryrefslogtreecommitdiff
path: root/bgpd
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2025-04-07 03:27:02 +0300
committerGitHub <noreply@github.com>2025-04-07 03:27:02 +0300
commit5e092d0e25cad3227cbe54b5179d559d4f244285 (patch)
tree2cc8e3d9f6cc9eaaeb891281e0010ae9525c66c6 /bgpd
parent259ffe1dfe0cfa1428d772fc66f2526ead2d40f1 (diff)
parent2cee5567bc49c603de3a142a9cb5a4fab560cb6c (diff)
Merge pull request #18558 from spoignant-proton/master
bgpd: flowspec: remove sizelimit check applied to the wrong length field (issue 18557)
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_flowspec.c7
-rw-r--r--bgpd/bgp_flowspec_private.h1
-rw-r--r--bgpd/bgp_route.h1
3 files changed, 0 insertions, 9 deletions
diff --git a/bgpd/bgp_flowspec.c b/bgpd/bgp_flowspec.c
index bd04970fd5..6f1780665d 100644
--- a/bgpd/bgp_flowspec.c
+++ b/bgpd/bgp_flowspec.c
@@ -105,13 +105,6 @@ int bgp_nlri_parse_flowspec(struct peer *peer, struct attr *attr,
if (!attr)
withdraw = true;
- if (packet->length >= FLOWSPEC_NLRI_SIZELIMIT_EXTENDED) {
- flog_err(EC_BGP_FLOWSPEC_PACKET,
- "BGP flowspec nlri length maximum reached (%u)",
- packet->length);
- return BGP_NLRI_PARSE_ERROR_FLOWSPEC_NLRI_SIZELIMIT;
- }
-
for (; pnt < lim; pnt += psize) {
/* Clear prefix structure. */
memset(&p, 0, sizeof(p));
diff --git a/bgpd/bgp_flowspec_private.h b/bgpd/bgp_flowspec_private.h
index 049cb6df77..fa611bd372 100644
--- a/bgpd/bgp_flowspec_private.h
+++ b/bgpd/bgp_flowspec_private.h
@@ -7,7 +7,6 @@
#define _FRR_BGP_FLOWSPEC_PRIVATE_H
#define FLOWSPEC_NLRI_SIZELIMIT 240
-#define FLOWSPEC_NLRI_SIZELIMIT_EXTENDED 4095
/* Flowspec raffic action bit*/
#define FLOWSPEC_TRAFFIC_ACTION_TERMINAL 1
diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h
index 5c10a865d1..af8c111043 100644
--- a/bgpd/bgp_route.h
+++ b/bgpd/bgp_route.h
@@ -88,7 +88,6 @@ enum bgp_show_adj_route_type {
#define BGP_NLRI_PARSE_ERROR_EVPN_TYPE4_SIZE -9
#define BGP_NLRI_PARSE_ERROR_EVPN_TYPE5_SIZE -10
#define BGP_NLRI_PARSE_ERROR_FLOWSPEC_IPV6_NOT_SUPPORTED -11
-#define BGP_NLRI_PARSE_ERROR_FLOWSPEC_NLRI_SIZELIMIT -12
#define BGP_NLRI_PARSE_ERROR_FLOWSPEC_BAD_FORMAT -13
#define BGP_NLRI_PARSE_ERROR_ADDRESS_FAMILY -14
#define BGP_NLRI_PARSE_ERROR_EVPN_TYPE1_SIZE -15