]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: ospf bandwidth handling
authorChirag Shah <chirag@cumulusnetworks.com>
Mon, 12 Jun 2017 20:17:28 +0000 (13:17 -0700)
committerChirag Shah <chirag@cumulusnetworks.com>
Mon, 12 Jun 2017 20:17:28 +0000 (13:17 -0700)
Handle proper indent and insert missing not statement.

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

index 2c270c5ca25353f6a8949a1c77662f9d34022e41..85f294966c044109c580ee59c799cfff03cdf4cd 100644 (file)
@@ -59,12 +59,10 @@ ospf_if_get_output_cost (struct ospf_interface *oi)
   u_int32_t cost;
   u_int32_t bw, refbw;
 
-  if (oi->ifp->bandwidth)
-    bw = oi->ifp->bandwidth;
   if (!oi->ifp->bandwidth && oi->ifp->speed)
     bw = oi->ifp->speed;
   else
-   bw = OSPF_DEFAULT_BANDWIDTH;
+    bw = oi->ifp->bandwidth ? oi->ifp->bandwidth : OSPF_DEFAULT_BANDWIDTH;
   refbw = oi->ospf->ref_bandwidth;
 
   /* A specifed ip ospf cost overrides a calculated one. */
index eb6b09c88c63e75663d49192e4bb91e8871db74a..d0747e1ad09854ef5dce5a21a9ba40bfdb5369ff 100644 (file)
@@ -189,7 +189,7 @@ ospf_interface_state_up (int command, struct zclient *zclient,
 
       if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE))
         zlog_debug ("Zebra: Interface[%s] state udpate speed change %u -> %u bw change %d -> %d.",
-                  ifp->name, if_tmp.speed, ifp->speed, if_tmp.bandwidth, ifp->bandwidth);
+                    ifp->name, if_tmp.speed, ifp->speed, if_tmp.bandwidth, ifp->bandwidth);
 
       ospf_if_recalculate_output_cost (ifp);