diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2024-03-08 08:11:14 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-08 08:11:14 -0500 |
| commit | 0d31f63dba95658fc8a553c450cecf78775b8423 (patch) | |
| tree | 54917504a4c783ccc1e43ff56f4ebcce8acffc15 /lib/if.c | |
| parent | 10486960b464cfef9d8002d6e5a204de0d1ab995 (diff) | |
| parent | 1db1fbf7a65ff6b6b7c33d365d22020dbf8f8000 (diff) | |
Merge pull request #15497 from idryzhov/show-run-fixes
a couple of fixes for "show running-config"
Diffstat (limited to 'lib/if.c')
| -rw-r--r-- | lib/if.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1340,6 +1340,15 @@ static void cli_show_interface_end(struct vty *vty, vty_out(vty, "exit\n"); } +static int cli_cmp_interface(const struct lyd_node *dnode1, + const struct lyd_node *dnode2) +{ + const char *ifname1 = yang_dnode_get_string(dnode1, "name"); + const char *ifname2 = yang_dnode_get_string(dnode2, "name"); + + return if_cmp_name_func(ifname1, ifname2); +} + void if_vty_config_start(struct vty *vty, struct interface *ifp) { vty_frame(vty, "!\n"); @@ -1760,6 +1769,7 @@ const struct frr_yang_module_info frr_interface_info = { .destroy = lib_interface_destroy, .cli_show = cli_show_interface, .cli_show_end = cli_show_interface_end, + .cli_cmp = cli_cmp_interface, .get_next = lib_interface_get_next, .get_keys = lib_interface_get_keys, .lookup_entry = lib_interface_lookup_entry, @@ -1842,6 +1852,7 @@ const struct frr_yang_module_info frr_interface_cli_info = { .cbs = { .cli_show = cli_show_interface, .cli_show_end = cli_show_interface_end, + .cli_cmp = cli_cmp_interface, }, }, { |
