diff options
| -rw-r--r-- | bgpd/bgp_flowspec.c | 8 | ||||
| -rw-r--r-- | bgpd/bgp_flowspec_private.h | 1 | ||||
| -rw-r--r-- | doc/user/zebra.rst | 18 |
3 files changed, 11 insertions, 16 deletions
diff --git a/bgpd/bgp_flowspec.c b/bgpd/bgp_flowspec.c index 9554638735..17c41636de 100644 --- a/bgpd/bgp_flowspec.c +++ b/bgpd/bgp_flowspec.c @@ -108,7 +108,7 @@ int bgp_nlri_parse_flowspec(struct peer *peer, struct attr *attr, return BGP_NLRI_PARSE_ERROR_FLOWSPEC_IPV6_NOT_SUPPORTED; } - if (packet->length >= FLOWSPEC_NLRI_SIZELIMIT) { + if (packet->length >= FLOWSPEC_NLRI_SIZELIMIT_EXTENDED) { flog_err(EC_BGP_FLOWSPEC_PACKET, "BGP flowspec nlri length maximum reached (%u)", packet->length); @@ -124,7 +124,11 @@ int bgp_nlri_parse_flowspec(struct peer *peer, struct attr *attr, return BGP_NLRI_PARSE_ERROR_PACKET_OVERFLOW; psize = *pnt++; - + if (psize >= FLOWSPEC_NLRI_SIZELIMIT) { + psize &= 0x0f; + psize = psize << 8; + psize |= *pnt++; + } /* When packet overflow occur return immediately. */ if (pnt + psize > lim) { flog_err( diff --git a/bgpd/bgp_flowspec_private.h b/bgpd/bgp_flowspec_private.h index dede4e03d3..cec244c165 100644 --- a/bgpd/bgp_flowspec_private.h +++ b/bgpd/bgp_flowspec_private.h @@ -20,6 +20,7 @@ #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/doc/user/zebra.rst b/doc/user/zebra.rst index 3629b47877..9dfd08f733 100644 --- a/doc/user/zebra.rst +++ b/doc/user/zebra.rst @@ -831,7 +831,8 @@ FPM Commands .. index:: clear zebra fpm stats .. clicmd:: clear zebra fpm stats - Resets all FPM counters. + Reset statistics related to the zebra code that interacts with the + optional Forwarding Plane Manager (FPM) component. ``dplane_fpm_nl`` implementation @@ -879,7 +880,8 @@ FPM Commands .. index:: clear fpm counters .. clicmd:: clear fpm counters - Resets all FPM counters. + Reset statistics related to the zebra code that interacts with the + optional Forwarding Plane Manager (FPM) component. .. _zebra-dplane: @@ -999,18 +1001,6 @@ zebra Terminal Mode Commands total number of route nodes in the table. Which will be higher than the actual number of routes that are held. -.. index:: show zebra fpm stats -.. clicmd:: show zebra fpm stats - - Display statistics related to the zebra code that interacts with the - optional Forwarding Plane Manager (FPM) component. - -.. index:: clear zebra fpm stats -.. clicmd:: clear zebra fpm stats - - Reset statistics related to the zebra code that interacts with the - optional Forwarding Plane Manager (FPM) component. - .. index:: show nexthop-group rib [ID] [vrf NAME] [singleton [ip|ip6]] .. clicmd:: show nexthop-group rib [ID] [vrf NAME] |
