summaryrefslogtreecommitdiffstats
path: root/isisd
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2017-09-23 19:27:29 +0200
committerChristian Franke <chris@opensourcerouting.org>2017-09-23 19:33:00 +0200
commit74361f41d9bbceedc511d8a086ad274a456d6b49 (patch)
tree76dd2aba45e80773c7b7a7776353ca33cc2c2f26 /isisd
parentMerge pull request #1222 from opensourcerouting/isis-spf-improvements (diff)
downloadfrr-74361f41d9bbceedc511d8a086ad274a456d6b49.tar.xz
frr-74361f41d9bbceedc511d8a086ad274a456d6b49.zip
isisd: use only one IP of neighbor as nexthop
There is no point in building a multipath route via one neighbor if there is only one link to the neighbor, but the neighbor has multiple IPs on that link. So only create one nexthop per link. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'isisd')
-rw-r--r--isisd/isis_route.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/isisd/isis_route.c b/isisd/isis_route.c
index 267e72002..ff17572ef 100644
--- a/isisd/isis_route.c
+++ b/isisd/isis_route.c
@@ -208,9 +208,6 @@ static void adjinfo2nexthop(struct list *nexthops, struct isis_adjacency *adj)
{
struct isis_nexthop *nh;
- if (!adj->ipv4_address_count)
- return;
-
for (unsigned int i = 0; i < adj->ipv4_address_count; i++) {
struct in_addr *ipv4_addr = &adj->ipv4_addresses[i];
if (!nexthoplookup(nexthops, ipv4_addr,
@@ -219,6 +216,7 @@ static void adjinfo2nexthop(struct list *nexthops, struct isis_adjacency *adj)
ipv4_addr, adj->circuit->interface->ifindex);
nh->router_address = adj->router_address;
listnode_add(nexthops, nh);
+ return;
}
}
}
@@ -227,9 +225,6 @@ static void adjinfo2nexthop6(struct list *nexthops6, struct isis_adjacency *adj)
{
struct isis_nexthop6 *nh6;
- if (!adj->ipv6_address_count)
- return;
-
for (unsigned int i = 0; i < adj->ipv6_address_count; i++) {
struct in6_addr *ipv6_addr = &adj->ipv6_addresses[i];
if (!nexthop6lookup(nexthops6, ipv6_addr,
@@ -238,6 +233,7 @@ static void adjinfo2nexthop6(struct list *nexthops6, struct isis_adjacency *adj)
ipv6_addr, adj->circuit->interface->ifindex);
nh6->router_address6 = adj->router_address6;
listnode_add(nexthops6, nh6);
+ return;
}
}
}