]> git.proxmox.com Git - mirror_frr.git/commitdiff
pimd: fix ip pim hello option does not take in effect
authorChirag Shah <chirag@cumulusnetworks.com>
Tue, 24 Jan 2017 01:39:54 +0000 (17:39 -0800)
committerChirag Shah <chirag@cumulusnetworks.com>
Wed, 17 May 2017 02:30:14 +0000 (19:30 -0700)
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>
pimd/pim_cmd.c

index 1224bc5fc80223b9da14d172784a79d6de848915..0f4e8fdcbf030ea1f525997c7e59128290a46252 100644 (file)
@@ -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)