Skip to content

Commit

Permalink
ripd: fix no ip rip split-horizon poisoned-reverse command
Browse files Browse the repository at this point in the history
`no ip rip split-horizon poisoned-reverse` will undo poisoned-reverse and set default behavior which is split-horizon.
By contrast, `no ip rip split-horizon` will undo interface's split-horizon behavior.

Signed-off-by: Shbinging <bingshui@smail.nju.edu.cn>
  • Loading branch information
Shbinging committed Feb 25, 2025
1 parent f35de3f commit 02e9755
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ripd/rip_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,10 @@ DEFPY_YANG (ip_rip_split_horizon,
{
const char *value;

if (no)
value = "disabled";
if (no && poisoned_reverse == NULL)
value = "disabled";
else if (no && poisoned_reverse)
value = "simple";
else if (poisoned_reverse)
value = "poison-reverse";
else
Expand Down

0 comments on commit 02e9755

Please sign in to comment.