]> git.proxmox.com Git - mirror_frr.git/blobdiff - vrrpd/vrrp_vty.c
vrrpd: const vrrp_lookup()
[mirror_frr.git] / vrrpd / vrrp_vty.c
index f71b343140f26e69519c7b9db1f41bb5eb53fefd..239b02ee7fef95086e80bb5d3fefbaf1827a2616 100644 (file)
@@ -145,10 +145,11 @@ DEFPY(vrrp_advertisement_interval,
 
        struct vrrp_vrouter *vr;
        uint16_t newadvint =
-               no ? vd.advertisement_interval * 10 : advertisement_interval;
+               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 */