If frr.conf file has pim hello option setup prior to pim sm under an interface, upon frr start/restart hello option cli replayed prior to sm command
from vtysh. Added a code in pim hello option cli handler to create pim vif if it does not exist.
Testing Done:
configure pim hello options before pim sm in frr.conf file and restart frr
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
pim_ifp = ifp->info;
- if (!pim_ifp) {
- vty_out(vty, "Pim not enabled on this interface%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
+ if (!pim_ifp)
+ {
+ if (!pim_cmd_interface_add(ifp))
+ {
+ vty_out(vty, "Could not enable PIM SM on interface%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+ }
+ pim_ifp = ifp->info;
pim_ifp->pim_hello_period = strtol(argv[idx_time]->arg, NULL, 10);
if (argc == idx_hold + 1)