diff options
Diffstat (limited to 'pimd/pim_nb_config.c')
-rw-r--r-- | pimd/pim_nb_config.c | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/pimd/pim_nb_config.c b/pimd/pim_nb_config.c index be05b69..4f1a4a1 100644 --- a/pimd/pim_nb_config.c +++ b/pimd/pim_nb_config.c @@ -485,7 +485,7 @@ int routing_control_plane_protocols_name_validate( { const char *name; - name = yang_dnode_get_string(args->dnode, "./name"); + name = yang_dnode_get_string(args->dnode, "name"); if (!strmatch(name, "pim")) { snprintf(args->errmsg, args->errmsg_len, "pim supports only one instance with name pimd"); @@ -779,7 +779,7 @@ void routing_control_plane_protocols_control_plane_protocol_pim_address_family_s vrf = nb_running_get_entry(args->dnode, NULL, true); pim = vrf->info; - spt_switch_action = yang_dnode_get_enum(args->dnode, "./spt-action"); + spt_switch_action = yang_dnode_get_enum(args->dnode, "spt-action"); switch (spt_switch_action) { case PIM_SPT_INFINITY: @@ -922,8 +922,7 @@ int routing_control_plane_protocols_control_plane_protocol_pim_address_family_ss case NB_EV_APPLY: vrf = nb_running_get_entry(args->dnode, NULL, true); pim = vrf->info; - yang_dnode_get_pimaddr(&source_addr, args->dnode, - "./source-addr"); + yang_dnode_get_pimaddr(&source_addr, args->dnode, NULL); result = pim_ssmpingd_start(pim, source_addr); if (result) { snprintf( @@ -953,8 +952,7 @@ int routing_control_plane_protocols_control_plane_protocol_pim_address_family_ss case NB_EV_APPLY: vrf = nb_running_get_entry(args->dnode, NULL, true); pim = vrf->info; - yang_dnode_get_pimaddr(&source_addr, args->dnode, - "./source-addr"); + yang_dnode_get_pimaddr(&source_addr, args->dnode, NULL); result = pim_ssmpingd_stop(pim, source_addr); if (result) { snprintf( @@ -1233,8 +1231,8 @@ int routing_control_plane_protocols_control_plane_protocol_pim_address_family_ms case NB_EV_APPLY: vrf = nb_running_get_entry(args->dnode, NULL, true); pim = vrf->info; - yang_dnode_get_ip(&peer_ip, args->dnode, "./peer-ip"); - yang_dnode_get_ip(&source_ip, args->dnode, "./source-ip"); + yang_dnode_get_ip(&peer_ip, args->dnode, "peer-ip"); + yang_dnode_get_ip(&source_ip, args->dnode, "source-ip"); mp = pim_msdp_peer_add(pim, &peer_ip.ipaddr_v4, &source_ip.ipaddr_v4, NULL); nb_running_set_entry(args->dnode, mp); @@ -1338,16 +1336,16 @@ void routing_control_plane_protocols_control_plane_protocol_pim_address_family_m struct interface *ifp; struct ipaddr reg_addr; - ifname = yang_dnode_get_string(args->dnode, "./peerlink-rif"); + ifname = yang_dnode_get_string(args->dnode, "peerlink-rif"); ifp = if_lookup_by_name(ifname, VRF_DEFAULT); if (!ifp) { snprintf(args->errmsg, args->errmsg_len, "No such interface name %s", ifname); return; } - role = yang_dnode_get_enum(args->dnode, "./my-role"); - peer_state = yang_dnode_get_bool(args->dnode, "./peer-state"); - yang_dnode_get_ip(®_addr, args->dnode, "./reg-address"); + role = yang_dnode_get_enum(args->dnode, "my-role"); + peer_state = yang_dnode_get_bool(args->dnode, "peer-state"); + yang_dnode_get_ip(®_addr, args->dnode, "reg-address"); pim_vxlan_mlag_update(true, peer_state, role, ifp, ®_addr.ip._v4_addr); @@ -1759,11 +1757,11 @@ void lib_interface_pim_address_family_bfd_apply_finish( } pim_ifp->bfd_config.detection_multiplier = - yang_dnode_get_uint8(args->dnode, "./detect_mult"); + yang_dnode_get_uint8(args->dnode, "detect_mult"); pim_ifp->bfd_config.min_rx = - yang_dnode_get_uint16(args->dnode, "./min-rx-interval"); + yang_dnode_get_uint16(args->dnode, "min-rx-interval"); pim_ifp->bfd_config.min_tx = - yang_dnode_get_uint16(args->dnode, "./min-tx-interval"); + yang_dnode_get_uint16(args->dnode, "min-tx-interval"); pim_bfd_reg_dereg_all_nbr(ifp); } @@ -2191,7 +2189,7 @@ int lib_interface_pim_address_family_mroute_destroy( pim_iifp = iif->info; pim = pim_iifp->pim; - oifname = yang_dnode_get_string(args->dnode, "./oif"); + oifname = yang_dnode_get_string(args->dnode, "oif"); oif = if_lookup_by_name(oifname, pim->vrf->vrf_id); if (!oif) { @@ -2201,8 +2199,8 @@ int lib_interface_pim_address_family_mroute_destroy( return NB_ERR_INCONSISTENCY; } - yang_dnode_get_pimaddr(&source_addr, args->dnode, "./source-addr"); - yang_dnode_get_pimaddr(&group_addr, args->dnode, "./group-addr"); + yang_dnode_get_pimaddr(&source_addr, args->dnode, "source-addr"); + yang_dnode_get_pimaddr(&group_addr, args->dnode, "group-addr"); if (pim_static_del(pim, iif, oif, group_addr, source_addr)) { snprintf(args->errmsg, args->errmsg_len, @@ -2341,9 +2339,9 @@ int routing_control_plane_protocols_control_plane_protocol_pim_address_family_rp case NB_EV_APPLY: vrf = nb_running_get_entry(args->dnode, NULL, true); pim = vrf->info; - yang_dnode_get_pimaddr(&rp_addr, args->dnode, "./rp-address"); + yang_dnode_get_pimaddr(&rp_addr, args->dnode, "rp-address"); - if (yang_dnode_get(args->dnode, "./group-list")) { + if (yang_dnode_get(args->dnode, "group-list")) { yang_dnode_get_prefix(&group, args->dnode, "./group-list"); apply_mask(&group); @@ -2352,7 +2350,7 @@ int routing_control_plane_protocols_control_plane_protocol_pim_address_family_rp args->errmsg_len); } - else if (yang_dnode_get(args->dnode, "./prefix-list")) { + else if (yang_dnode_get(args->dnode, "prefix-list")) { plist = yang_dnode_get_string(args->dnode, "./prefix-list"); if (!pim_get_all_mcast_group(&group)) { |