summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.dir-locals.el7
-rw-r--r--eigrpd/eigrp_dump.c5
-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
6 files changed, 20 insertions, 10 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000000..fc70462d40
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,7 @@
+;;; Directory Local Variables
+;;; For more information see (info "(emacs) Directory Variables")
+;;; Match project coding conventions
+((c-mode
+ (indent-tabs-mode . t)
+ (c-basic-offset . 8)))
+
diff --git a/eigrpd/eigrp_dump.c b/eigrpd/eigrp_dump.c
index db5e38d422..aca6e59816 100644
--- a/eigrpd/eigrp_dump.c
+++ b/eigrpd/eigrp_dump.c
@@ -252,7 +252,10 @@ void show_ip_eigrp_neighbor_sub(struct vty *vty, struct eigrp_neighbor *nbr,
vty_out(vty, "%-3u %-17s %-21s", 0, eigrp_neigh_ip_string(nbr),
eigrp_if_name_string(nbr->ei));
- vty_out(vty, "%-7lu", thread_timer_remain_second(nbr->t_holddown));
+ if (nbr->t_holddown)
+ vty_out(vty, "%-7lu", thread_timer_remain_second(nbr->t_holddown));
+ else
+ vty_out(vty, "- ");
vty_out(vty, "%-8u %-6u %-5u", 0, 0, EIGRP_PACKET_RETRANS_TIME);
vty_out(vty, "%-7lu", nbr->retrans_queue->count);
vty_out(vty, "%u\n", nbr->recv_sequence_number);
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;