]> git.puffer.fish Git - mirror/frr.git/commitdiff
ripd: fix no ip rip split-horizon poisoned-reverse command 18256/head
authorShbinging <bingshui@smail.nju.edu.cn>
Tue, 25 Feb 2025 08:07:45 +0000 (16:07 +0800)
committerShbinging <bingshui@smail.nju.edu.cn>
Tue, 25 Feb 2025 08:07:49 +0000 (16:07 +0800)
`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>
ripd/rip_cli.c

index 5712a0b825b9022b7686585423d0c60406f9f2ba..0bafc6f3427b0dd02612c3f5dcbf3bf93c06f45e 100644 (file)
@@ -681,9 +681,9 @@ DEFPY_YANG (ip_rip_split_horizon,
 {
        const char *value;
 
-       if (no)
+       if (no && poisoned_reverse == NULL)
                value = "disabled";
-       else if (poisoned_reverse)
+       else if (poisoned_reverse && no == NULL)
                value = "poison-reverse";
        else
                value = "simple";