diff options
-rw-r--r-- | isisd/isis_route.c | 8 |
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; } } } |