]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Treat as4-path (17) attribute as withdraw if malformed 14341/head
authorDonatas Abraitis <donatas@opensourcerouting.org>
Fri, 1 Sep 2023 14:10:12 +0000 (17:10 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Fri, 1 Sep 2023 14:10:12 +0000 (17:10 +0300)
rfc7606 defines:

Attributes 17 (AS4_PATH), 18 (AS4_AGGREGATOR), 22 (PMSI_TUNNEL), 23 (Tunnel
   Encapsulation Attribute), 26 (AIGP), 27 (PE Distinguisher Labels),
   and 29 (BGP-LS Attribute) do have error handling consistent with
   Section 8 and thus are not further discussed herein.

Section 8 defines:

The "treat-as-withdraw" approach is generally
   preferred and the "session reset" approach is discouraged.
For any malformed attribute that is handled by the "attribute
   discard" instead of the "treat-as-withdraw" approach, it is critical
   to consider the potential impact of doing so.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgp_attr.c

index b14411a10c7a89fed7088de9f1564c1c6943551c..3b22702937174005f98ec1fb4f3803cb7e297169 100644 (file)
@@ -1396,6 +1396,7 @@ bgp_attr_malformed(struct bgp_attr_parser_args *args, uint8_t subcode,
         */
        case BGP_ATTR_ORIGIN:
        case BGP_ATTR_AS_PATH:
+       case BGP_ATTR_AS4_PATH:
        case BGP_ATTR_NEXT_HOP:
        case BGP_ATTR_MULTI_EXIT_DISC:
        case BGP_ATTR_LOCAL_PREF: