]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Handle non-transitive extended communities for link-bandwidth
authorDonatas Abraitis <donatas@opensourcerouting.org>
Thu, 17 Oct 2024 08:11:50 +0000 (11:11 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 22 Oct 2024 06:01:04 +0000 (09:01 +0300)
If we received a non-transitive extended community (in this case it was
extended link-bandwidth), we treated it as unknown because we didn't check for
the transitive flag correctly.

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

index 547dcdf7f32a54358423378c7dd2b447e5cb4494..e0bf196e796a373f903a7f940b665852bfe9d6b8 100644 (file)
@@ -1408,7 +1408,8 @@ char *ecommunity_ecom2str(struct ecommunity *ecom, int format, int filter)
                                         "FS:marking %u", *(pnt + 5));
                        } else
                                unk_ecom = true;
-               } else if (type == ECOMMUNITY_ENCODE_AS_NON_TRANS) {
+               } else if (CHECK_FLAG(type, ECOMMUNITY_ENCODE_AS_NON_TRANS) ||
+                          CHECK_FLAG(type, ECOMMUNITY_FLAG_NON_TRANSITIVE)) {
                        sub_type = *pnt++;
                        if (sub_type == ECOMMUNITY_LINK_BANDWIDTH)
                                ecommunity_lb_str(encbuf, sizeof(encbuf), pnt,