]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Check and print if we receive ORF reserved type 12257/head
authorDonatas Abraitis <donatas@opensourcerouting.org>
Thu, 3 Nov 2022 14:19:21 +0000 (16:19 +0200)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Thu, 3 Nov 2022 14:19:21 +0000 (16:19 +0200)
Just for debugging purposes and a better visibility.

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

index d1667fac2612f1a3b8e634d2789284cdc1013773..c8cb6b77e2754ef196270e4451b2cdab5e86215d 100644 (file)
@@ -357,6 +357,7 @@ static void bgp_capability_orf_not_support(struct peer *peer, iana_afi_t afi,
 }
 
 static const struct message orf_type_str[] = {
+       {ORF_TYPE_RESERVED, "Reserved"},
        {ORF_TYPE_PREFIX, "Prefixlist"},
        {ORF_TYPE_PREFIX_OLD, "Prefixlist (old)"},
        {0}};
@@ -433,6 +434,12 @@ static int bgp_capability_orf_entry(struct peer *peer,
                switch (hdr->code) {
                case CAPABILITY_CODE_ORF:
                        switch (type) {
+                       case ORF_TYPE_RESERVED:
+                               if (bgp_debug_neighbor_events(peer))
+                                       zlog_debug(
+                                               "%s Addr-family %d/%d has reserved ORF type, ignoring",
+                                               peer->host, afi, safi);
+                               break;
                        case ORF_TYPE_PREFIX:
                                break;
                        default:
@@ -443,6 +450,12 @@ static int bgp_capability_orf_entry(struct peer *peer,
                        break;
                case CAPABILITY_CODE_ORF_OLD:
                        switch (type) {
+                       case ORF_TYPE_RESERVED:
+                               if (bgp_debug_neighbor_events(peer))
+                                       zlog_debug(
+                                               "%s Addr-family %d/%d has reserved ORF type, ignoring",
+                                               peer->host, afi, safi);
+                               break;
                        case ORF_TYPE_PREFIX_OLD:
                                break;
                        default:
index 19ddd9bd25afed6a9019ae1df3edb3e83cc8be69..6be94443c80f818ea0a1b0d102d2497469700f85 100644 (file)
@@ -76,6 +76,7 @@ struct graceful_restart_af {
 /* Cooperative Route Filtering Capability.  */
 
 /* ORF Type */
+#define ORF_TYPE_RESERVED               0
 #define ORF_TYPE_PREFIX                64
 #define ORF_TYPE_PREFIX_OLD           128