summaryrefslogtreecommitdiff
path: root/ripd/rip_cli.c
diff options
context:
space:
mode:
authorTuetuopay <tuetuopay@me.com>2019-03-28 18:41:38 +0100
committerGitHub <noreply@github.com>2019-03-28 18:41:38 +0100
commitd074383c621d904847d6c1cdf1e4d8825caf14ba (patch)
treeb0449b0bc79226875a2c2d4586ccbdd102ddaca4 /ripd/rip_cli.c
parent0fb2ad05d9e11a211915208e3fa648c8e170e31e (diff)
parent8db37bf14a28ccf89d891fe094d72c65b389dfd3 (diff)
Merge branch 'master' into evpn-session-vrf
Diffstat (limited to 'ripd/rip_cli.c')
-rw-r--r--ripd/rip_cli.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/ripd/rip_cli.c b/ripd/rip_cli.c
index 6fbcdc059b..62aaad5d97 100644
--- a/ripd/rip_cli.c
+++ b/ripd/rip_cli.c
@@ -378,10 +378,19 @@ DEFPY (rip_passive_interface,
"Suppress routing updates on an interface\n"
"Interface name\n")
{
- nb_cli_enqueue_change(vty, "./passive-interface",
- no ? NB_OP_DESTROY : NB_OP_CREATE, ifname);
- nb_cli_enqueue_change(vty, "./non-passive-interface",
- no ? NB_OP_CREATE : NB_OP_DESTROY, ifname);
+ bool passive_default =
+ yang_dnode_get_bool(vty->candidate_config->dnode, "%s%s",
+ VTY_CURR_XPATH, "/passive-default");
+
+ if (passive_default) {
+ nb_cli_enqueue_change(vty, "./non-passive-interface",
+ no ? NB_OP_CREATE : NB_OP_DESTROY,
+ ifname);
+ } else {
+ nb_cli_enqueue_change(vty, "./passive-interface",
+ no ? NB_OP_DESTROY : NB_OP_CREATE,
+ ifname);
+ }
return nb_cli_apply_changes(vty, NULL);
}