diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2019-04-05 03:28:00 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2019-07-02 03:56:52 +0200 |
commit | 94b7ff4649f80a2a388f28d2728fe85b890546cf (patch) | |
tree | 098c113c2f6775551fc97461bd8b82ac37b07c19 /ripd | |
parent | lib: fix a couple of yang validation issues (diff) | |
download | frr-94b7ff4649f80a2a388f28d2728fe85b890546cf.tar.xz frr-94b7ff4649f80a2a388f28d2728fe85b890546cf.zip |
ripd: fix problems with the "ip rip authentication" command
libyang-0.16-r3 doesn't allow the creation of data nodes if their
corresponding "when" statement (if any) resolves to false. This
change broke the "ip rip authentication" command.
This commit adapts this command so that it's not affected by the
new libyang stricter validation checks.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripd')
-rw-r--r-- | ripd/rip_cli.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ripd/rip_cli.c b/ripd/rip_cli.c index 346e93b8e..627d3d199 100644 --- a/ripd/rip_cli.c +++ b/ripd/rip_cli.c @@ -829,8 +829,10 @@ DEFPY (ip_rip_authentication_mode, nb_cli_enqueue_change(vty, "./authentication-scheme/mode", NB_OP_MODIFY, strmatch(mode, "md5") ? "md5" : "plain-text"); - nb_cli_enqueue_change(vty, "./authentication-scheme/md5-auth-length", - NB_OP_MODIFY, value); + if (strmatch(mode, "md5")) + nb_cli_enqueue_change(vty, + "./authentication-scheme/md5-auth-length", + NB_OP_MODIFY, value); return nb_cli_apply_changes(vty, "./frr-ripd:rip"); } @@ -852,7 +854,7 @@ DEFPY (no_ip_rip_authentication_mode, nb_cli_enqueue_change(vty, "./authentication-scheme/mode", NB_OP_MODIFY, NULL); nb_cli_enqueue_change(vty, "./authentication-scheme/md5-auth-length", - NB_OP_MODIFY, NULL); + NB_OP_DESTROY, NULL); return nb_cli_apply_changes(vty, "./frr-ripd:rip"); } |