From: Donatas Abraitis Date: Thu, 3 Nov 2022 14:19:21 +0000 (+0200) Subject: bgpd: Check and print if we receive ORF reserved type X-Git-Tag: base_8.5~274^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F12257%2Fhead;p=mirror%2Ffrr.git bgpd: Check and print if we receive ORF reserved type Just for debugging purposes and a better visibility. Signed-off-by: Donatas Abraitis --- diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index d1667fac26..c8cb6b77e2 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -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: diff --git a/bgpd/bgp_open.h b/bgpd/bgp_open.h index 19ddd9bd25..6be94443c8 100644 --- a/bgpd/bgp_open.h +++ b/bgpd/bgp_open.h @@ -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