summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_route.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_route.c')
-rw-r--r--ospfd/ospf_route.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/ospfd/ospf_route.c b/ospfd/ospf_route.c
index a06e18b8..10608f50 100644
--- a/ospfd/ospf_route.c
+++ b/ospfd/ospf_route.c
@@ -755,12 +755,18 @@ ospf_route_copy_nexthops_from_vertex (struct ospf_route *to,
{
nexthop = vp->nexthop;
- if (nexthop->oi != NULL)
+ if (nexthop->oi != NULL)
{
- if (! ospf_path_exist (to->paths, nexthop->router, nexthop->oi))
+ if (!ospf_path_exist (to->paths, nexthop->router, nexthop->oi))
{
path = ospf_path_new ();
- path->nexthop = nexthop->router;
+
+ /* PtoP I/F's are always directly connected */
+ if (if_is_pointopoint (nexthop->oi->ifp))
+ path->nexthop.s_addr = INADDR_ANY;
+ else
+ path->nexthop = nexthop->router;
+
path->ifindex = nexthop->oi->ifp->ifindex;
listnode_add (to->paths, path);
}