mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-10 20:18:03 +00:00
Merge pull request #2169 from piotrjurkiewicz/eigrp_feasibility
eigrpd: Consider only feasible successors as successors
This commit is contained in:
commit
1c96f2fb96
@ -443,17 +443,24 @@ void eigrp_topology_update_node_flags(struct eigrp_prefix_entry *dest)
|
|||||||
struct eigrp *eigrp = eigrp_lookup();
|
struct eigrp *eigrp = eigrp_lookup();
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS_RO(dest->entries, node, entry)) {
|
for (ALL_LIST_ELEMENTS_RO(dest->entries, node, entry)) {
|
||||||
|
if (entry->reported_distance < dest->fdistance) {
|
||||||
|
// is feasible successor, can be successor
|
||||||
if (((uint64_t)entry->distance
|
if (((uint64_t)entry->distance
|
||||||
<= (uint64_t)dest->distance * (uint64_t)eigrp->variance)
|
<= (uint64_t)dest->distance
|
||||||
&& entry->distance != EIGRP_MAX_METRIC) // is successor
|
* (uint64_t)eigrp->variance)
|
||||||
{
|
&& entry->distance != EIGRP_MAX_METRIC) {
|
||||||
entry->flags |= EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG;
|
// is successor
|
||||||
entry->flags &= ~EIGRP_NEXTHOP_ENTRY_FSUCCESSOR_FLAG;
|
entry->flags |=
|
||||||
} else if (entry->reported_distance
|
EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG;
|
||||||
< dest->fdistance) // is feasible successor
|
entry->flags &=
|
||||||
{
|
~EIGRP_NEXTHOP_ENTRY_FSUCCESSOR_FLAG;
|
||||||
entry->flags |= EIGRP_NEXTHOP_ENTRY_FSUCCESSOR_FLAG;
|
} else {
|
||||||
entry->flags &= ~EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG;
|
// is feasible successor only
|
||||||
|
entry->flags |=
|
||||||
|
EIGRP_NEXTHOP_ENTRY_FSUCCESSOR_FLAG;
|
||||||
|
entry->flags &=
|
||||||
|
~EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
entry->flags &= ~EIGRP_NEXTHOP_ENTRY_FSUCCESSOR_FLAG;
|
entry->flags &= ~EIGRP_NEXTHOP_ENTRY_FSUCCESSOR_FLAG;
|
||||||
entry->flags &= ~EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG;
|
entry->flags &= ~EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG;
|
||||||
|
Loading…
Reference in New Issue
Block a user