]> git.proxmox.com Git - mirror_frr.git/blobdiff - vrrpd/vrrp_vty.c
Merge pull request #5237 from ton31337/fix/doc_bgp_redistribute_vpn
[mirror_frr.git] / vrrpd / vrrp_vty.c
index b14efc33e7380cc5ace10b41b72702717e0de4e3..239b02ee7fef95086e80bb5d3fefbaf1827a2616 100644 (file)
@@ -29,8 +29,8 @@
 
 #include "vrrp.h"
 #include "vrrp_debug.h"
-#include "vrrp_memory.h"
 #include "vrrp_vty.h"
+#include "vrrp_zebra.h"
 #ifndef VTYSH_EXTRACT_PL
 #include "vrrpd/vrrp_vty_clippy.c"
 #endif
@@ -144,11 +144,12 @@ DEFPY(vrrp_advertisement_interval,
        VTY_DECLVAR_CONTEXT(interface, ifp);
 
        struct vrrp_vrouter *vr;
-       uint16_t newadvint = no ? vd.advertisement_interval * 10:
-                                 advertisement_interval;
+       uint16_t newadvint =
+               no ? vd.advertisement_interval * CS2MS : advertisement_interval;
 
-       if (newadvint % 10 != 0) {
-               vty_out(vty, "%% Value must be a multiple of 10\n");
+       if (newadvint % CS2MS != 0) {
+               vty_out(vty, "%% Value must be a multiple of %u\n",
+                       (unsigned int)CS2MS);
                return CMD_WARNING_CONFIG_FAILED;
        }
 
@@ -327,8 +328,9 @@ DEFPY(vrrp_default,
       "Force VRRP router into administrative shutdown\n")
 {
        if (adv) {
-               if (advint % 10 != 0) {
-                       vty_out(vty, "%% Value must be a multiple of 10\n");
+               if (advint % CS2MS != 0) {
+                       vty_out(vty, "%% Value must be a multiple of %u\n",
+                               (unsigned int)CS2MS);
                        return CMD_WARNING_CONFIG_FAILED;
                }
                /* all internal computations are in centiseconds */