]> git.proxmox.com Git - mirror_frr.git/commitdiff
ospfd: Fix ospf timers command
authorChirag Shah <chirag@cumulusnetworks.com>
Fri, 2 Jun 2017 22:35:25 +0000 (15:35 -0700)
committerChirag Shah <chirag@cumulusnetworks.com>
Fri, 2 Jun 2017 22:49:13 +0000 (15:49 -0700)
ospf timers related commands under router ospf were not accepted
due to incorrect argument count check.

timers throttle lsa all (0-5000)
timers throttle spf (0-600000) (0-600000) (0-600000)
timers lsa arrival (0-1000)
timers lsa min-arrival (0-600000)

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
ospfd/ospf_vty.c

index bb908ead2f65a3f1ecd1bbaba4df46195eb45b51..d987fef433b2f9c43e38a4571a32aae46ef043fc 100644 (file)
@@ -2222,7 +2222,7 @@ DEFUN (ospf_timers_min_ls_interval,
   int idx_number = 4;
   unsigned int interval;
 
-  if (argc != 1)
+  if (argc < 5)
     {
       vty_out (vty, "Insufficient arguments%s", VTY_NEWLINE);
       return CMD_WARNING;
@@ -2264,7 +2264,7 @@ DEFUN (ospf_timers_min_ls_arrival,
   int idx_number = 3;
   unsigned int arrival;
 
-  if (argc != 1)
+  if (argc < 4)
     {
       vty_out (vty, "Insufficient arguments%s", VTY_NEWLINE);
       return CMD_WARNING;
@@ -2309,7 +2309,7 @@ DEFUN (ospf_timers_throttle_spf,
   int idx_number_3 = 5;
   unsigned int delay, hold, max;
   
-  if (argc != 3)
+  if (argc < 6)
     {
       vty_out (vty, "Insufficient arguments%s", VTY_NEWLINE);
       return CMD_WARNING;
@@ -2352,7 +2352,7 @@ DEFUN (ospf_timers_lsa,
   int idx_number = 3;
   unsigned int minarrival;
 
-  if (argc != 1)
+  if (argc < 4)
     {
       vty_out (vty, "Insufficient number of arguments%s", VTY_NEWLINE);
       return CMD_WARNING;