]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_vty.c
Merge pull request #12176 from sworleys/BGP-InQ
[mirror_frr.git] / bgpd / bgp_vty.c
index c5ce295c550d056097ce78e6b2cc8b9ad8320b9a..e856529fc693f4ebedd258df8429d2f1e79569fc 100644 (file)
@@ -12282,6 +12282,16 @@ static void bgp_show_peer_afi(struct vty *vty, struct peer *p, afi_t afi,
                                json_addr,
                                "privateAsNumsRemovedInUpdatesToNbr");
 
+               if (CHECK_FLAG(p->af_flags[afi][safi], PEER_FLAG_ALLOWAS_IN)) {
+                       if (CHECK_FLAG(p->af_flags[afi][safi],
+                                      PEER_FLAG_ALLOWAS_IN_ORIGIN))
+                               json_object_boolean_true_add(json_addr,
+                                                            "allowAsInOrigin");
+                       else
+                               json_object_int_add(json_addr, "allowAsInCount",
+                                                   p->allowas_in[afi][safi]);
+               }
+
                if (p->addpath_type[afi][safi] != BGP_ADDPATH_NONE)
                        json_object_boolean_true_add(
                                json_addr,
@@ -12598,6 +12608,17 @@ static void bgp_show_peer_afi(struct vty *vty, struct peer *p, afi_t afi,
                        vty_out(vty,
                                "  Private AS numbers removed in updates to this neighbor\n");
 
+               if (CHECK_FLAG(p->af_flags[afi][safi], PEER_FLAG_ALLOWAS_IN)) {
+                       if (CHECK_FLAG(p->af_flags[afi][safi],
+                                      PEER_FLAG_ALLOWAS_IN_ORIGIN))
+                               vty_out(vty,
+                                       "  Local AS allowed as path origin\n");
+                       else
+                               vty_out(vty,
+                                       "  Local AS allowed in path, %d occurrences\n",
+                                       p->allowas_in[afi][safi]);
+               }
+
                if (p->addpath_type[afi][safi] != BGP_ADDPATH_NONE)
                        vty_out(vty, "  %s\n",
                                bgp_addpath_names(p->addpath_type[afi][safi])