Skip to content

Commit

Permalink
lib: Remove dead code
Browse files Browse the repository at this point in the history
The distribute_list_init command is not used and is setup
code that will never be used because it makes assumptions about
how distribute-lists work that are fundamentally incorrect.

Remove the code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
  • Loading branch information
donaldsharp committed Mar 26, 2021
1 parent b6500ea commit 9bb400d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
17 changes: 0 additions & 17 deletions lib/distribute.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,20 +486,3 @@ struct distribute_ctx *distribute_list_ctx_create(struct vrf *vrf)
listnode_add(dist_ctx_list, ctx);
return ctx;
}

/* Initialize distribute list vty commands */
void distribute_list_init(int node)
{
/* TODO: install v4 syntax command for v6 only protocols. */
/* if (node == RIPNG_NODE) {
* install_element (node, &ipv6_as_v4_distribute_list_all_cmd);
* install_element (node, &no_ipv6_as_v4_distribute_list_all_cmd);
* install_element (node, &ipv6_as_v4_distribute_list_cmd);
* install_element (node, &no_ipv6_as_v4_distribute_list_cmd);
* install_element (node, &ipv6_as_v4_distribute_list_prefix_all_cmd);
* install_element (node,
&no_ipv6_as_v4_distribute_list_prefix_all_cmd);
* install_element (node, &ipv6_as_v4_distribute_list_prefix_cmd);
* install_element (node, &no_ipv6_as_v4_distribute_list_prefix_cmd);
}*/
}
1 change: 0 additions & 1 deletion lib/distribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ struct distribute_ctx {
};

/* Prototypes for distribute-list. */
extern void distribute_list_init(int node);
extern struct distribute_ctx *distribute_list_ctx_create(struct vrf *vrf);
extern void distribute_list_delete(struct distribute_ctx **ctx);
extern void distribute_list_add_hook(struct distribute_ctx *ctx,
Expand Down

0 comments on commit 9bb400d

Please sign in to comment.