Skip to content

Commit 5e092d0

Browse files
authored
Merge pull request #18558 from spoignant-proton/master
bgpd: flowspec: remove sizelimit check applied to the wrong length field (issue 18557)
2 parents 259ffe1 + 2cee556 commit 5e092d0

File tree

3 files changed

+0
-9
lines changed

3 files changed

+0
-9
lines changed

bgpd/bgp_flowspec.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,6 @@ int bgp_nlri_parse_flowspec(struct peer *peer, struct attr *attr,
105105
if (!attr)
106106
withdraw = true;
107107

108-
if (packet->length >= FLOWSPEC_NLRI_SIZELIMIT_EXTENDED) {
109-
flog_err(EC_BGP_FLOWSPEC_PACKET,
110-
"BGP flowspec nlri length maximum reached (%u)",
111-
packet->length);
112-
return BGP_NLRI_PARSE_ERROR_FLOWSPEC_NLRI_SIZELIMIT;
113-
}
114-
115108
for (; pnt < lim; pnt += psize) {
116109
/* Clear prefix structure. */
117110
memset(&p, 0, sizeof(p));

bgpd/bgp_flowspec_private.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#define _FRR_BGP_FLOWSPEC_PRIVATE_H
88

99
#define FLOWSPEC_NLRI_SIZELIMIT 240
10-
#define FLOWSPEC_NLRI_SIZELIMIT_EXTENDED 4095
1110

1211
/* Flowspec raffic action bit*/
1312
#define FLOWSPEC_TRAFFIC_ACTION_TERMINAL 1

bgpd/bgp_route.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ enum bgp_show_adj_route_type {
8888
#define BGP_NLRI_PARSE_ERROR_EVPN_TYPE4_SIZE -9
8989
#define BGP_NLRI_PARSE_ERROR_EVPN_TYPE5_SIZE -10
9090
#define BGP_NLRI_PARSE_ERROR_FLOWSPEC_IPV6_NOT_SUPPORTED -11
91-
#define BGP_NLRI_PARSE_ERROR_FLOWSPEC_NLRI_SIZELIMIT -12
9291
#define BGP_NLRI_PARSE_ERROR_FLOWSPEC_BAD_FORMAT -13
9392
#define BGP_NLRI_PARSE_ERROR_ADDRESS_FAMILY -14
9493
#define BGP_NLRI_PARSE_ERROR_EVPN_TYPE1_SIZE -15

0 commit comments

Comments
 (0)