]> git.puffer.fish Git - mirror/frr.git/commitdiff
eigrpd: Improve external route distance comparison
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 22 Aug 2017 20:24:23 +0000 (16:24 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 24 Aug 2017 12:04:20 +0000 (08:04 -0400)
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>
eigrpd/eigrp_topology.c

index d1c09d661213ea8eb487b08d63f8b5f42f7f4134..9f62e5e899ae8ad25669ebe5aba0cf499ddecca9 100644 (file)
@@ -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;
                }