summaryrefslogtreecommitdiff
path: root/proto/ospf/rt.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-06-11 12:12:11 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2013-06-11 12:12:11 +0200
commitf623ab9875cad2d129f708e95021d3a252930000 (patch)
tree03c6bae47798d39ebe85853fb573f6c0d025c5b6 /proto/ospf/rt.c
parent924868543c2010f3ef2cfcb7ba6bac5988ab3264 (diff)
Implements OSPF stub router option (RFC 3137).
Also fixes OSPFv3 routing table calculcation w.r.t. errata 2078 to RFC 5340.
Diffstat (limited to 'proto/ospf/rt.c')
-rw-r--r--proto/ospf/rt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c
index 4b8de4b8..f509b896 100644
--- a/proto/ospf/rt.c
+++ b/proto/ospf/rt.c
@@ -501,6 +501,10 @@ ospf_rt_spfa(struct ospf_area *oa)
#ifdef OSPFv2
ospf_rt_spfa_rtlinks(oa, act, act);
#else /* OSPFv3 */
+ /* Errata 2078 to RFC 5340 4.8.1 - skip links from non-routing nodes */
+ if ((act != oa->rt) && !(rt->options & OPT_R))
+ break;
+
for (tmp = ospf_hash_find_rt_first(po->gr, act->domain, act->lsa.rt);
tmp; tmp = ospf_hash_find_rt_next(tmp))
ospf_rt_spfa_rtlinks(oa, act, tmp);
@@ -1839,7 +1843,7 @@ add_cand(list * l, struct top_hash_entry *en, struct top_hash_entry *par,
if (en->lsa.type == LSA_T_RT)
{
struct ospf_lsa_rt *rt = en->lsa_body;
- if (!(rt->options & OPT_V6) || !(rt->options & OPT_R))
+ if (!(rt->options & OPT_V6))
return;
}
#endif