]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_aspath.c
Merge pull request #5686 from qlyoung/fix-bgp-fqdn-capability-leak
[mirror_frr.git] / bgpd / bgp_aspath.c
index 5fa773c95b0002f18641aaaec43761e3dc1720f6..a781e70d2f58798c98fa5a6a596e9b496e09def2 100644 (file)
@@ -416,6 +416,19 @@ unsigned int aspath_count_hops(const struct aspath *aspath)
        return count;
 }
 
+/* Check if aspath has AS_SET or AS_CONFED_SET */
+bool aspath_check_as_sets(struct aspath *aspath)
+{
+       struct assegment *seg = aspath->segments;
+
+       while (seg) {
+               if (seg->type == AS_SET || seg->type == AS_CONFED_SET)
+                       return true;
+               seg = seg->next;
+       }
+       return false;
+}
+
 /* Estimate size aspath /might/ take if encoded into an
  * ASPATH attribute.
  *