From: Chirag Shah Date: Tue, 24 Jan 2017 01:39:54 +0000 (-0800) Subject: pimd: fix ip pim hello option does not take in effect X-Git-Tag: frr-3.0-rc0~18^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=30cfe9a2910297f1114c3da44d97e0fdcacaecd0;p=mirror%2Ffrr.git pimd: fix ip pim hello option does not take in effect 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 --- diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 1224bc5fc8..0f4e8fdcbf 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -5075,11 +5075,16 @@ DEFUN (interface_ip_pim_hello, 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)