From a8ba847ff96b41e06770d4987b15707890ed5807 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Mon, 27 Jul 2009 12:42:34 +0200 Subject: ospfd: Change struct ospf_path *oi to ifindex. * global: In struct ospf_path, change struct ospf_interface *oi to int ifindex. It is unsafe to reference *oi as an ospf interface can be deleted under your feet. Use a weak reference instead. --- ospfd/ospf_ase.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ospfd/ospf_ase.c') diff --git a/ospfd/ospf_ase.c b/ospfd/ospf_ase.c index 044f97c6..7bddf3f4 100644 --- a/ospfd/ospf_ase.c +++ b/ospfd/ospf_ase.c @@ -135,6 +135,7 @@ ospf_ase_complete_direct_routes (struct ospf_route *ro, struct in_addr nexthop) { struct listnode *node; struct ospf_path *op; + struct interface *ifp; for (ALL_LIST_ELEMENTS_RO (ro->paths, node, op)) if (op->nexthop.s_addr == 0) @@ -593,7 +594,7 @@ ospf_ase_route_match_same (struct route_table *rt, struct prefix *prefix, if (! IPV4_ADDR_SAME (&op->nexthop, &newop->nexthop)) return 0; - if (op->oi->ifp->ifindex != newop->oi->ifp->ifindex) + if (op->ifindex != newop->ifindex) return 0; } return 1; -- cgit v1.2.1