summaryrefslogtreecommitdiffstats
path: root/eigrpd/eigrp_topology.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-08-22 22:24:23 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-08-24 14:04:20 +0200
commit3aea4e507bc6c129e1bdcfbaaefca6a829ee1825 (patch)
tree0736761b27de92cc1f26c52b76b415504803f823 /eigrpd/eigrp_topology.c
parenteigrpd: make fsm msg data_type an enum (diff)
downloadfrr-3aea4e507bc6c129e1bdcfbaaefca6a829ee1825.tar.xz
frr-3aea4e507bc6c129e1bdcfbaaefca6a829ee1825.zip
eigrpd: Improve external route distance comparison
If the new nexthop is external while the previous best was Internal or Connected, it should always loose. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd/eigrp_topology.c')
-rw-r--r--eigrpd/eigrp_topology.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/eigrpd/eigrp_topology.c b/eigrpd/eigrp_topology.c
index d1c09d661..9f62e5e89 100644
--- a/eigrpd/eigrp_topology.c
+++ b/eigrpd/eigrp_topology.c
@@ -414,9 +414,13 @@ enum metric_change eigrp_topology_update_distance(struct eigrp_fsm_action_messag
case EIGRP_EXT:
{
ext_data = msg->data.ipv4_ext_data;
- if (eigrp_metrics_is_same(ext_data->metric,
- entry->reported_metric))
- return change;
+
+ if (prefix->nt == EIGRP_TOPOLOGY_TYPE_REMOTE_EXTERNAL) {
+ if (eigrp_metrics_is_same(ext_data->metric,
+ entry->reported_metric))
+ return change;
+ } else
+ change = METRIC_INCREASE;
break;
}