summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
authorEmanuele Di Pascale <emanuele@voltanet.io>2020-05-19 15:53:02 +0200
committerEmanuele Di Pascale <emanuele@voltanet.io>2020-05-19 17:08:04 +0200
commit5eb567edc8980ef8a9a70e12bdfce2d5b3b09374 (patch)
treef2ad762932013a97aa1fa2dfdf3f16ab54a43ac4 /lib/if.c
parent22857da1bbe3eda766e353caaf5c6cd551fe9540 (diff)
lib: fix bandwidth multiplier for link param
in the CLI we state that the bandwidth of a link is in Megabits per second, but when converting it to Bytes per second for TE purposes we were treating it as Kilobits. Fix the conversion error. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/if.c b/lib/if.c
index 5c0f5e61aa..a1e02f4f30 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -1274,7 +1274,7 @@ struct if_link_params *if_link_params_get(struct interface *ifp)
/* Compute default bandwidth based on interface */
iflp->default_bw =
((ifp->bandwidth ? ifp->bandwidth : DEFAULT_BANDWIDTH)
- * TE_KILO_BIT / TE_BYTE);
+ * TE_MEGA_BIT / TE_BYTE);
/* Set Max, Reservable and Unreserved Bandwidth */
iflp->max_bw = iflp->default_bw;