summaryrefslogtreecommitdiff
path: root/staticd/static_nb_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'staticd/static_nb_config.c')
-rw-r--r--staticd/static_nb_config.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/staticd/static_nb_config.c b/staticd/static_nb_config.c
index bf669957bf..3f1d0aa496 100644
--- a/staticd/static_nb_config.c
+++ b/staticd/static_nb_config.c
@@ -140,7 +140,7 @@ static bool static_nexthop_create(struct nb_cb_create_args *args,
pn = nb_running_get_entry(args->dnode, NULL, true);
rn = nb_running_get_entry(rn_dnode, NULL, true);
- if (!static_add_nexthop_validate(info->svrf, nh_type, &ipaddr))
+ if (!static_add_nexthop_validate(nh_vrf, nh_type, &ipaddr))
flog_warn(
EC_LIB_NB_CB_CONFIG_VALIDATE,
"Warning!! Local connected address is configured as Gateway IP((%s))",
@@ -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;
}