From 4e0a64dda4140aa8f9614b9636384a777e134944 Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Wed, 26 May 2021 14:30:51 -0400 Subject: [PATCH] staticd: return SUCCESS when deleting non-existent route Return SUCCESS if trying to delete route that doesn't exist. This was always staticd's behavior before the northbound conversion. Signed-off-by: Mark Stapp --- staticd/static_vty.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/staticd/static_vty.c b/staticd/static_vty.c index 3bdd4a673c..ea09054a23 100644 --- a/staticd/static_vty.c +++ b/staticd/static_vty.c @@ -325,9 +325,8 @@ static int static_route_leak(struct vty *vty, const char *svrf, dnode = yang_dnode_get(vty->candidate_config->dnode, ab_xpath); if (!dnode) { - vty_out(vty, - "%% Refusing to remove a non-existent route\n"); - return ret; + /* Silently return */ + return CMD_SUCCESS; } dnode = yang_get_subtree_with_no_sibling(dnode); -- 2.39.5