summaryrefslogtreecommitdiffstats
path: root/ripd/rip_nb_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'ripd/rip_nb_config.c')
-rw-r--r--ripd/rip_nb_config.c37
1 files changed, 27 insertions, 10 deletions
diff --git a/ripd/rip_nb_config.c b/ripd/rip_nb_config.c
index 8d3b670..fb75337 100644
--- a/ripd/rip_nb_config.c
+++ b/ripd/rip_nb_config.c
@@ -35,7 +35,7 @@ int ripd_instance_create(struct nb_cb_create_args *args)
const char *vrf_name;
int socket;
- vrf_name = yang_dnode_get_string(args->dnode, "./vrf");
+ vrf_name = yang_dnode_get_string(args->dnode, "vrf");
vrf = vrf_lookup_by_name(vrf_name);
/*
@@ -189,7 +189,7 @@ int ripd_instance_distance_source_create(struct nb_cb_create_args *args)
if (args->event != NB_EV_APPLY)
return NB_OK;
- yang_dnode_get_ipv4p(&prefix, args->dnode, "./prefix");
+ yang_dnode_get_ipv4p(&prefix, args->dnode, "prefix");
apply_mask_ipv4(&prefix);
/* Get RIP distance node. */
@@ -395,7 +395,7 @@ int ripd_instance_offset_list_create(struct nb_cb_create_args *args)
return NB_OK;
rip = nb_running_get_entry(args->dnode, NULL, true);
- ifname = yang_dnode_get_string(args->dnode, "./interface");
+ ifname = yang_dnode_get_string(args->dnode, "interface");
offset = rip_offset_list_new(rip, ifname);
nb_running_set_entry(args->dnode, offset);
@@ -411,7 +411,7 @@ int ripd_instance_offset_list_destroy(struct nb_cb_destroy_args *args)
if (args->event != NB_EV_APPLY)
return NB_OK;
- direct = yang_dnode_get_enum(args->dnode, "./direction");
+ direct = yang_dnode_get_enum(args->dnode, "direction");
offset = nb_running_unset_entry(args->dnode);
if (offset->direct[direct].alist_name) {
@@ -548,6 +548,23 @@ int ripd_instance_non_passive_interface_destroy(struct nb_cb_destroy_args *args)
return rip_passive_nondefault_unset(rip, ifname);
}
+
+/*
+ * XPath: /frr-ripd:ripd/instance/distribute-list
+ */
+int ripd_instance_distribute_list_create(struct nb_cb_create_args *args)
+{
+ struct rip *rip;
+
+ if (args->event != NB_EV_APPLY)
+ return NB_OK;
+
+ rip = nb_running_get_entry(args->dnode, NULL, true);
+ group_distribute_list_create_helper(args, rip->distribute_ctx);
+
+ return NB_OK;
+}
+
/*
* XPath: /frr-ripd:ripd/instance/redistribute
*/
@@ -560,7 +577,7 @@ int ripd_instance_redistribute_create(struct nb_cb_create_args *args)
return NB_OK;
rip = nb_running_get_entry(args->dnode, NULL, true);
- type = yang_dnode_get_enum(args->dnode, "./protocol");
+ type = yang_dnode_get_enum(args->dnode, "protocol");
rip->redist[type].enabled = true;
@@ -576,7 +593,7 @@ int ripd_instance_redistribute_destroy(struct nb_cb_destroy_args *args)
return NB_OK;
rip = nb_running_get_entry(args->dnode, NULL, true);
- type = yang_dnode_get_enum(args->dnode, "./protocol");
+ type = yang_dnode_get_enum(args->dnode, "protocol");
rip->redist[type].enabled = false;
if (rip->redist[type].route_map.name) {
@@ -600,7 +617,7 @@ void ripd_instance_redistribute_apply_finish(
int type;
rip = nb_running_get_entry(args->dnode, NULL, true);
- type = yang_dnode_get_enum(args->dnode, "./protocol");
+ type = yang_dnode_get_enum(args->dnode, "protocol");
if (rip->enabled)
rip_redistribute_conf_update(rip, type);
@@ -1123,12 +1140,12 @@ int lib_interface_rip_bfd_create(struct nb_cb_create_args *args)
ifp = nb_running_get_entry(args->dnode, NULL, true);
ri = ifp->info;
- ri->bfd.enabled = yang_dnode_get_bool(args->dnode, "./enable");
+ ri->bfd.enabled = yang_dnode_get_bool(args->dnode, "enable");
XFREE(MTYPE_RIP_BFD_PROFILE, ri->bfd.profile);
- if (yang_dnode_exists(args->dnode, "./profile"))
+ if (yang_dnode_exists(args->dnode, "profile"))
ri->bfd.profile = XSTRDUP(
MTYPE_RIP_BFD_PROFILE,
- yang_dnode_get_string(args->dnode, "./profile"));
+ yang_dnode_get_string(args->dnode, "profile"));
rip_bfd_interface_update(ri);