]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_aspath.c
*: require semicolon after DEFINE_<typesafe...>
[mirror_frr.git] / bgpd / bgp_aspath.c
index be80675b5d02f683e6abadf52053bdf9d50028c6..5cf3c60fa2cd97d5467ec180698455a62f153f25 100644 (file)
@@ -428,6 +428,22 @@ bool aspath_check_as_sets(struct aspath *aspath)
        return false;
 }
 
+/* Check if aspath has BGP_AS_ZERO */
+bool aspath_check_as_zero(struct aspath *aspath)
+{
+       struct assegment *seg = aspath->segments;
+       unsigned int i;
+
+       while (seg) {
+               for (i = 0; i < seg->length; i++)
+                       if (seg->as[i] == BGP_AS_ZERO)
+                               return true;
+               seg = seg->next;
+       }
+
+       return false;
+}
+
 /* Estimate size aspath /might/ take if encoded into an
  * ASPATH attribute.
  *
@@ -1707,8 +1723,7 @@ struct aspath *aspath_reconcile_as4(struct aspath *aspath,
                        if (hops < seg->length) {
                                if (BGP_DEBUG(as4, AS4))
                                        zlog_debug(
-                                               "[AS4] AS4PATHmangle: AS_CONFED_SEQUENCE falls"
-                                               " across 2/4 ASN boundary somewhere, broken..");
+                                               "[AS4] AS4PATHmangle: AS_CONFED_SEQUENCE falls across 2/4 ASN boundary somewhere, broken..");
                                hops = seg->length;
                        }
                /* fallthru */