summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-08-10 19:13:19 -0400
committerGitHub <noreply@github.com>2017-08-10 19:13:19 -0400
commit72faaf794622ce8786f0c80bb913cb16ab44d23b (patch)
treefa82b7fdcfe9dae498ad9050458a5c73c61e2a76
parent44fe86a340b5e79d244eb0bbd59d191b03a600fa (diff)
parentb1968f83da6e5a6d865d09dcb59a0ec7b89c0f43 (diff)
Merge pull request #956 from lunn/eigrpd-bandwidth
eigrpd: fix spelling of "bandwidth"
-rw-r--r--eigrpd/eigrp_interface.c2
-rw-r--r--eigrpd/eigrp_network.c10
-rw-r--r--eigrpd/eigrp_packet.c4
-rw-r--r--eigrpd/eigrp_structs.h2
4 files changed, 9 insertions, 9 deletions
diff --git a/eigrpd/eigrp_interface.c b/eigrpd/eigrp_interface.c
index 2312cc6edd..7f05e14703 100644
--- a/eigrpd/eigrp_interface.c
+++ b/eigrpd/eigrp_interface.c
@@ -265,7 +265,7 @@ int eigrp_if_up(struct eigrp_interface *ei)
thread_add_event(master, eigrp_hello_timer, ei, (1), NULL);
/*Prepare metrics*/
- metric.bandwith =
+ metric.bandwidth =
eigrp_bandwidth_to_scaled(EIGRP_IF_PARAM(ei, bandwidth));
metric.delay = eigrp_delay_to_scaled(EIGRP_IF_PARAM(ei, delay));
metric.load = EIGRP_IF_PARAM(ei, load);
diff --git a/eigrpd/eigrp_network.c b/eigrpd/eigrp_network.c
index 80610e04a7..ec8806750b 100644
--- a/eigrpd/eigrp_network.c
+++ b/eigrpd/eigrp_network.c
@@ -392,9 +392,9 @@ u_int32_t eigrp_calculate_metrics(struct eigrp *eigrp,
// {K1*BW+[(K2*BW)/(256-load)]+(K3*delay)}*{K5/(reliability+K4)}
if (eigrp->k_values[0])
- temp_metric += (eigrp->k_values[0] * metric.bandwith);
+ temp_metric += (eigrp->k_values[0] * metric.bandwidth);
if (eigrp->k_values[1])
- temp_metric += ((eigrp->k_values[1] * metric.bandwith)
+ temp_metric += ((eigrp->k_values[1] * metric.bandwidth)
/ (256 - metric.load));
if (eigrp->k_values[2])
temp_metric += (eigrp->k_values[2] * metric.delay);
@@ -425,9 +425,9 @@ u_int32_t eigrp_calculate_total_metrics(struct eigrp *eigrp,
u_int32_t bw =
eigrp_bandwidth_to_scaled(EIGRP_IF_PARAM(entry->ei, bandwidth));
- entry->total_metric.bandwith = entry->total_metric.bandwith > bw
+ entry->total_metric.bandwidth = entry->total_metric.bandwidth > bw
? bw
- : entry->total_metric.bandwith;
+ : entry->total_metric.bandwidth;
return eigrp_calculate_metrics(eigrp, entry->total_metric);
}
@@ -435,7 +435,7 @@ u_int32_t eigrp_calculate_total_metrics(struct eigrp *eigrp,
u_char eigrp_metrics_is_same(struct eigrp_metrics metric1,
struct eigrp_metrics metric2)
{
- if ((metric1.bandwith == metric2.bandwith)
+ if ((metric1.bandwidth == metric2.bandwidth)
&& (metric1.delay == metric2.delay)
&& (metric1.hop_count == metric2.hop_count)
&& (metric1.load == metric2.load)
diff --git a/eigrpd/eigrp_packet.c b/eigrpd/eigrp_packet.c
index 3befd8a118..dfc7463025 100644
--- a/eigrpd/eigrp_packet.c
+++ b/eigrpd/eigrp_packet.c
@@ -1141,7 +1141,7 @@ struct TLV_IPv4_Internal_type *eigrp_read_ipv4_tlv(struct stream *s)
tlv->length = stream_getw(s);
tlv->forward.s_addr = stream_getl(s);
tlv->metric.delay = stream_getl(s);
- tlv->metric.bandwith = stream_getl(s);
+ tlv->metric.bandwidth = stream_getl(s);
tlv->metric.mtu[0] = stream_getc(s);
tlv->metric.mtu[1] = stream_getc(s);
tlv->metric.mtu[2] = stream_getc(s);
@@ -1210,7 +1210,7 @@ u_int16_t eigrp_add_internalTLV_to_stream(struct stream *s,
/*Metric*/
stream_putl(s, pe->reported_metric.delay);
- stream_putl(s, pe->reported_metric.bandwith);
+ stream_putl(s, pe->reported_metric.bandwidth);
stream_putc(s, pe->reported_metric.mtu[2]);
stream_putc(s, pe->reported_metric.mtu[1]);
stream_putc(s, pe->reported_metric.mtu[0]);
diff --git a/eigrpd/eigrp_structs.h b/eigrpd/eigrp_structs.h
index 6b3a14abc5..fd3e4b2014 100644
--- a/eigrpd/eigrp_structs.h
+++ b/eigrpd/eigrp_structs.h
@@ -59,7 +59,7 @@ struct eigrp_master {
struct eigrp_metrics {
u_int32_t delay;
- u_int32_t bandwith;
+ u_int32_t bandwidth;
unsigned char mtu[3];
u_char hop_count;
u_char reliability;