]> git.proxmox.com Git - mirror_frr.git/commitdiff
ospfd: When converting to ms divide by 1000
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 13 Mar 2019 00:44:31 +0000 (20:44 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 13 Mar 2019 12:09:59 +0000 (08:09 -0400)
When converting to miliseconds divide by 1000 not
the other way around.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
ospfd/ospf_vty.c

index 7ae83c56a11f07a13cf738f46a1b14efcc5489b0..93a850743579e857b1c8dd3ae6b6c11f3b682dfc 100644 (file)
@@ -3490,7 +3490,7 @@ static void show_ip_ospf_interface_sub(struct vty *vty, struct ospf *ospf,
                                            oi->output_cost);
                        json_object_int_add(
                                json_interface_sub, "transmitDelayMsecs",
-                               1000 / OSPF_IF_PARAM(oi, transmit_delay));
+                               OSPF_IF_PARAM(oi, transmit_delay) / 1000);
                        json_object_string_add(json_interface_sub, "state",
                                               lookup_msg(ospf_ism_state_msg,
                                                          oi->state, NULL));
@@ -3594,20 +3594,20 @@ static void show_ip_ospf_interface_sub(struct vty *vty, struct ospf *ospf,
                        if (OSPF_IF_PARAM(oi, fast_hello) == 0)
                                json_object_int_add(
                                        json_interface_sub, "timerMsecs",
-                                       1000 / OSPF_IF_PARAM(oi, v_hello));
+                                       OSPF_IF_PARAM(oi, v_hello) / 1000);
                        else
                                json_object_int_add(
                                        json_interface_sub, "timerMsecs",
-                                       1000 / OSPF_IF_PARAM(oi, fast_hello));
+                                       OSPF_IF_PARAM(oi, fast_hello) / 1000);
                        json_object_int_add(json_interface_sub,
                                            "timerDeadMsecs",
-                                           1000 / OSPF_IF_PARAM(oi, v_wait));
+                                           OSPF_IF_PARAM(oi, v_wait) / 1000);
                        json_object_int_add(json_interface_sub,
                                            "timerWaitMsecs",
-                                           1000 / OSPF_IF_PARAM(oi, v_wait));
+                                           OSPF_IF_PARAM(oi, v_wait) / 1000);
                        json_object_int_add(
                                json_interface_sub, "timerRetransmit",
-                               1000 / OSPF_IF_PARAM(oi, retransmit_interval));
+                               OSPF_IF_PARAM(oi, retransmit_interval) / 1000);
                } else {
                        vty_out(vty, "  Timer intervals configured,");
                        vty_out(vty, " Hello ");