From: David Lamparter Date: Wed, 22 Mar 2017 09:22:14 +0000 (+0100) Subject: vtysh: parsing fixes on distribute-list X-Git-Tag: frr-3.1-dev~21 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=2f834b3561609a15d68228091192755f77522b66;p=matthieu%2Ffrr.git vtysh: parsing fixes on distribute-list The vtysh preprocessing stuff doesn't like the first argument to install_element() being something other than a _NODE constant, and the comment hack wasn't cutting it... just expand this. Signed-off-by: David Lamparter --- diff --git a/lib/distribute.c b/lib/distribute.c index 2e76e352cb..01c338f177 100644 --- a/lib/distribute.c +++ b/lib/distribute.c @@ -524,14 +524,14 @@ distribute_list_init (int node) disthash = hash_create (distribute_hash_make, (int (*) (const void *, const void *)) distribute_cmp); - install_element (node, &distribute_list_cmd); - install_element (node, &no_distribute_list_cmd); -/* - install_element (RIP_NODE, &distribute_list_cmd); - install_element (RIP_NODE, &no_distribute_list_cmd); - install_element (RIPNG_NODE, &distribute_list_cmd); - install_element (RIPNG_NODE, &no_distribute_list_cmd); - */ + /* vtysh command-extraction doesn't grok install_element(node, ) */ + if (node == RIP_NODE) { + install_element (RIP_NODE, &distribute_list_cmd); + install_element (RIP_NODE, &no_distribute_list_cmd); + } else if (node == RIPNG_NODE) { + install_element (RIPNG_NODE, &distribute_list_cmd); + install_element (RIPNG_NODE, &no_distribute_list_cmd); + } /* install v6 */ if (node == RIPNG_NODE) {