Skip to content

Commit

Permalink
Merge pull request #7334 from mjstapp/fix_multi_connected_7_5
Browse files Browse the repository at this point in the history
[7.5] zebra: support multiple connected subnets on an interface
  • Loading branch information
donaldsharp authored Oct 18, 2020
2 parents 0b27ab2 + c0a046b commit b5566ba
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions zebra/zebra_rib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1355,8 +1355,6 @@ static void zebra_rib_fixup_system(struct route_node *rn)
static bool rib_compare_routes(const struct route_entry *re1,
const struct route_entry *re2)
{
bool result = false;

if (re1->type != re2->type)
return false;

Expand All @@ -1370,17 +1368,14 @@ static bool rib_compare_routes(const struct route_entry *re1,
re1->distance != re2->distance)
return false;

/* Only connected routes need more checking, nexthop-by-nexthop */
/* We support multiple connected routes: this supports multiple
* v6 link-locals, and we also support multiple addresses in the same
* subnet on a single interface.
*/
if (re1->type != ZEBRA_ROUTE_CONNECT)
return true;

/* Quick check if shared nhe */
if (re1->nhe == re2->nhe)
return true;

result = nexthop_group_equal_no_recurse(&re1->nhe->nhg, &re2->nhe->nhg);

return result;
return false;
}

/*
Expand Down

0 comments on commit b5566ba

Please sign in to comment.