summaryrefslogtreecommitdiff
path: root/staticd/static_nb_config.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-02-17 14:19:40 +0300
committerIgor Ryzhov <iryzhov@nfware.com>2021-02-17 14:19:40 +0300
commiteec2baa01a37162cfc7a8c319d43a9f9111eb276 (patch)
tree5af19ed85a80e829c9f9530c5ae85c514c9e0102 /staticd/static_nb_config.c
parentddd455157e0a390601ecdfd1db0880ec34974965 (diff)
staticd: fix nexthop creation and installation
Currently, staticd creates a VRF for the nexthop it is trying to install. Later, when this nexthop is deleted, the VRF stays in the system and can not be deleted by the user because "no vrf" command doesn't work for this VRF because it was not created through northbound code. There is no need to create the VRF. Just set nh_vrf_id to VRF_UNKNOWN when the VRF doesn't exist. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'staticd/static_nb_config.c')
-rw-r--r--staticd/static_nb_config.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/staticd/static_nb_config.c b/staticd/static_nb_config.c
index cbcfea77cc..3f1d0aa496 100644
--- a/staticd/static_nb_config.c
+++ b/staticd/static_nb_config.c
@@ -148,18 +148,6 @@ static bool static_nexthop_create(struct nb_cb_create_args *args,
"./gateway"));
nh = static_add_nexthop(rn, pn, info->safi, info->svrf, nh_type,
&ipaddr, ifname, nh_vrf, 0);
- if (!nh) {
- char buf[SRCDEST2STR_BUFFER];
-
- flog_warn(
- EC_LIB_NB_CB_CONFIG_APPLY,
- "%s : nh [%d:%s:%s:%s] nexthop creation failed",
- srcdest_rnode2str(rn, buf, sizeof(buf)),
- nh_type, ifname,
- yang_dnode_get_string(args->dnode, "./gateway"),
- nh_vrf);
- return NB_ERR;
- }
nb_running_set_entry(args->dnode, nh);
break;
}