]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_vty.c
eigrpd: eigrp usage of uint32_t to struct in_addr for router_id data
[mirror_frr.git] / zebra / zebra_vty.c
index e6cc802d08129be32996cf24b2cffa143be72d69..8b06d2ae115a9683f0714e91503efc3ffdc225f9 100644 (file)
@@ -948,6 +948,39 @@ DEFUN (show_ip_nht,
        return CMD_SUCCESS;
 }
 
+DEFPY (show_ip_import_check,
+       show_ip_import_check_cmd,
+       "show <ip$ipv4|ipv6$ipv6> import-check [vrf NAME$vrf_name|vrf all$vrf_all]",
+       SHOW_STR
+       IP_STR
+       IP6_STR
+       "IP import check tracking table\n"
+       VRF_CMD_HELP_STR
+       VRF_ALL_CMD_HELP_STR)
+{
+       afi_t afi = ipv4 ? AFI_IP : AFI_IP6;
+       vrf_id_t vrf_id = VRF_DEFAULT;
+
+       if (vrf_all) {
+               struct vrf *vrf;
+               struct zebra_vrf *zvrf;
+
+               RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name)
+                       if ((zvrf = vrf->info) != NULL) {
+                               vty_out(vty, "\nVRF %s:\n",
+                                       zvrf_name(zvrf));
+                               zebra_print_rnh_table(zvrf_id(zvrf),
+                                                     afi, vty,
+                                                     RNH_NEXTHOP_TYPE);
+                       }
+               return CMD_SUCCESS;
+       }
+       if (vrf_name)
+               VRF_GET_ID(vrf_id, vrf_name, false);
+
+       zebra_print_rnh_table(vrf_id, afi, vty, RNH_IMPORT_CHECK_TYPE);
+       return CMD_SUCCESS;
+}
 
 DEFUN (show_ip_nht_vrf_all,
        show_ip_nht_vrf_all_cmd,
@@ -2907,6 +2940,7 @@ void zebra_vty_init(void)
        install_element(VIEW_NODE, &show_route_detail_cmd);
        install_element(VIEW_NODE, &show_route_summary_cmd);
        install_element(VIEW_NODE, &show_ip_nht_cmd);
+       install_element(VIEW_NODE, &show_ip_import_check_cmd);
        install_element(VIEW_NODE, &show_ip_nht_vrf_all_cmd);
        install_element(VIEW_NODE, &show_ipv6_nht_cmd);
        install_element(VIEW_NODE, &show_ipv6_nht_vrf_all_cmd);