summaryrefslogtreecommitdiff
path: root/eigrpd/eigrp_network.c
diff options
context:
space:
mode:
Diffstat (limited to 'eigrpd/eigrp_network.c')
-rw-r--r--eigrpd/eigrp_network.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/eigrpd/eigrp_network.c b/eigrpd/eigrp_network.c
index c5f4080317..50e6b7b3be 100644
--- a/eigrpd/eigrp_network.c
+++ b/eigrpd/eigrp_network.c
@@ -271,6 +271,7 @@ static int eigrp_network_match_iface(const struct connected *co,
static void eigrp_network_run_interface(struct eigrp *eigrp, struct prefix *p,
struct interface *ifp)
{
+ struct eigrp_interface *ei;
struct listnode *cnode;
struct connected *co;
@@ -282,24 +283,15 @@ static void eigrp_network_run_interface(struct eigrp *eigrp, struct prefix *p,
continue;
if (p->family == co->address->family
- && !eigrp_if_table_lookup(ifp, co->address)
+ && !ifp->info
&& eigrp_network_match_iface(co, p)) {
- struct eigrp_interface *ei;
ei = eigrp_if_new(eigrp, ifp, co->address);
ei->connected = co;
- ei->params = eigrp_lookup_if_params(
- ifp, ei->address->u.prefix4);
-
/* Relate eigrp interface to eigrp instance. */
ei->eigrp = eigrp;
- /* update network type as interface flag */
- /* If network type is specified previously,
- skip network type setting. */
- ei->type = IF_DEF_PARAMS(ifp)->type;
-
/* if router_id is not configured, dont bring up
* interfaces.
* eigrp_router_id_update() will call eigrp_if_update
@@ -415,16 +407,17 @@ u_int32_t eigrp_calculate_metrics(struct eigrp *eigrp,
u_int32_t eigrp_calculate_total_metrics(struct eigrp *eigrp,
struct eigrp_nexthop_entry *entry)
{
+ struct eigrp_interface *ei = entry->ei;
+
entry->total_metric = entry->reported_metric;
uint64_t temp_delay = (uint64_t)entry->total_metric.delay
- + (uint64_t)eigrp_delay_to_scaled(
- EIGRP_IF_PARAM(entry->ei, delay));
+ + (uint64_t)eigrp_delay_to_scaled(ei->params.delay);
entry->total_metric.delay = temp_delay > EIGRP_MAX_METRIC
? EIGRP_MAX_METRIC
: (u_int32_t)temp_delay;
u_int32_t bw =
- eigrp_bandwidth_to_scaled(EIGRP_IF_PARAM(entry->ei, bandwidth));
+ eigrp_bandwidth_to_scaled(ei->params.bandwidth);
entry->total_metric.bandwidth = entry->total_metric.bandwidth > bw
? bw
: entry->total_metric.bandwidth;