summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_spf.c
diff options
context:
space:
mode:
authorJoakim Tjernlund <Joakim.Tjernlund@transmode.se>2012-07-07 17:06:12 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2012-07-25 18:07:37 +0200
commit57c639f01ec6be70ac858f412d32b638a9756bed (patch)
treecd415e8d098b827d69dcfdf3d3b22f5df11cc4c9 /ospfd/ospf_spf.c
parentospfd: Optimize and improve SPF nexthop calculation (diff)
downloadfrr-57c639f01ec6be70ac858f412d32b638a9756bed.tar.xz
frr-57c639f01ec6be70ac858f412d32b638a9756bed.zip
ospf_spf_process_stubs: use LSA pos to find OSFP interface
This is better than a prefix lookup as prefixes may not be unique, that is, the same prefix can exist on several interfaces. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospfd/ospf_spf.c')
-rw-r--r--ospfd/ospf_spf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index 26fe4851b..668295119 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -973,6 +973,7 @@ ospf_spf_process_stubs (struct ospf_area *area, struct vertex *v,
u_char *lim;
struct router_lsa_link *l;
struct router_lsa *rlsa;
+ int lsa_pos = 0;
if (IS_DEBUG_OSPF_EVENT)
zlog_debug ("ospf_process_stubs():processing router LSA, id: %s",
@@ -994,7 +995,8 @@ ospf_spf_process_stubs (struct ospf_area *area, struct vertex *v,
(l->m[0].tos_count * OSPF_ROUTER_LSA_TOS_SIZE));
if (l->m[0].type == LSA_LINK_TYPE_STUB)
- ospf_intra_add_stub (rt, l, v, area, parent_is_root);
+ ospf_intra_add_stub (rt, l, v, area, parent_is_root, lsa_pos);
+ lsa_pos++;
}
}