Skip to content

Commit

Permalink
ospf6d : Intra area route for connected prefix not installed
Browse files Browse the repository at this point in the history
Issue: When ospfv3 is configured on interface between routers in different network,
       the intra area route for the remote connected prefix is not installed in ospf
       route table and zebra

Fix: When the advertising router is directly connected but in different network
     the interface lookup in the intra area lsa processing does not provide
     the matching interface and valid nexthop. Therefore the nexthop is
     copied from the link state entry which contains valid
     ifindex required for installing the route.

Signed-off-by: kssoman <somanks@gmail.com>
  • Loading branch information
kssoman committed Sep 20, 2020
1 parent 1f79037 commit f67b5ee
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions ospf6d/ospf6_intra.c
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,
struct ospf6_nexthop *nh, *rnh;
char buf[PREFIX2STR_BUFFER];
bool route_found = false;
struct interface *ifp;
struct interface *ifp = NULL;
struct ospf6_lsa *lsa;
struct ospf6_intra_prefix_lsa *intra_prefix_lsa;

Expand Down Expand Up @@ -1571,12 +1571,15 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,
ifp = if_lookup_prefix(
&old_route->prefix,
oa->ospf6->vrf_id);
if (ifp)
ospf6_route_add_nexthop(
old_route,
}

if (ifp) {
/* Nexthop interafce found */
ospf6_route_add_nexthop(old_route,
ifp->ifindex,
NULL);
} else {
/* Copy nexthops from ls entry */
ospf6_route_merge_nexthops(old_route,
ls_entry);
}
Expand Down Expand Up @@ -1626,7 +1629,7 @@ void ospf6_intra_prefix_lsa_add(struct ospf6_lsa *lsa)
struct ospf6_prefix *op;
char *start, *current, *end;
char buf[PREFIX2STR_BUFFER];
struct interface *ifp;
struct interface *ifp = NULL;
int direct_connect = 0;
struct ospf6_path *path;

Expand Down Expand Up @@ -1716,10 +1719,13 @@ void ospf6_intra_prefix_lsa_add(struct ospf6_lsa *lsa)
if (direct_connect) {
ifp = if_lookup_prefix(&route->prefix,
oa->ospf6->vrf_id);
if (ifp)
ospf6_route_add_nexthop(route, ifp->ifindex,
NULL);
}

if (ifp) {
/* Nexthop interface found */
ospf6_route_add_nexthop(route, ifp->ifindex, NULL);
} else {
/* Copy nexthops from ls entry */
ospf6_route_copy_nexthops(route, ls_entry);
}

Expand Down

0 comments on commit f67b5ee

Please sign in to comment.