@@ -1837,6 +1837,34 @@ DEFPY_YANG(interface_ipv6_mld_require_ra, interface_ipv6_mld_require_ra_cmd,
18371837 return nb_cli_apply_changes (vty , FRR_GMP_INTERFACE_XPATH , FRR_PIM_AF_XPATH_VAL );
18381838}
18391839
1840+ DEFPY_YANG (pim_rpf_lookup_mode , pim_rpf_lookup_mode_cmd ,
1841+ "[no] rpf-lookup-mode\
1842+ ![urib-only|mrib-only|mrib-then-urib|lower-distance|longer-prefix]$mode\
1843+ [{group-list PREFIX_LIST$grp_list|source-list PREFIX_LIST$src_list}]" ,
1844+ NO_STR
1845+ "RPF lookup behavior\n"
1846+ "Lookup in unicast RIB only\n"
1847+ "Lookup in multicast RIB only\n"
1848+ "Try multicast RIB first, fall back to unicast RIB\n"
1849+ "Lookup both, use entry with lower distance\n"
1850+ "Lookup both, use entry with longer prefix\n"
1851+ "Set a specific mode matching group\n"
1852+ "Multicast group prefix list\n"
1853+ "Set a specific mode matching source address\n"
1854+ "Source address prefix list\n" )
1855+ {
1856+ if (no ) {
1857+ nb_cli_enqueue_change (vty , "./mode" , NB_OP_DESTROY , NULL );
1858+ nb_cli_enqueue_change (vty , "." , NB_OP_DESTROY , NULL );
1859+ } else {
1860+ nb_cli_enqueue_change (vty , "." , NB_OP_CREATE , NULL );
1861+ nb_cli_enqueue_change (vty , "./mode" , NB_OP_MODIFY , mode );
1862+ }
1863+
1864+ return nb_cli_apply_changes (vty , "./mcast-rpf-lookup[group-list='%s'][source-list='%s']" ,
1865+ (grp_list ? grp_list : "" ), (src_list ? src_list : "" ));
1866+ }
1867+
18401868DEFPY (show_ipv6_pim_rp ,
18411869 show_ipv6_pim_rp_cmd ,
18421870 "show ipv6 pim [vrf NAME] rp-info [X:X::X:X/M$group] [json$json]" ,
0 commit comments