]> git.puffer.fish Git - matthieu/frr.git/commitdiff
staticd: warn on attempted delete of non-existent route
authorWesley Coakley <wcoakley@nvidia.com>
Tue, 15 Dec 2020 01:01:24 +0000 (20:01 -0500)
committerWesley Coakley <wcoakley@nvidia.com>
Tue, 2 Mar 2021 17:19:43 +0000 (12:19 -0500)
Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
staticd/static_vty.c

index 1488cc1775378452569c030f68450413c600e6c2..dd03f8377885be8a8a257dc8257e798c27d5c0ef 100644 (file)
@@ -294,8 +294,11 @@ static int static_route_leak(struct vty *vty, const char *svrf,
                                 buf_gate_str, ifname);
 
                dnode = yang_dnode_get(vty->candidate_config->dnode, ab_xpath);
-               if (!dnode)
+               if (!dnode) {
+                       vty_out(vty,
+                               "%% Refusing to remove a non-existent route\n");
                        return ret;
+               }
 
                dnode = yang_get_subtree_with_no_sibling(dnode);
                assert(dnode);