summaryrefslogtreecommitdiffstats
path: root/proto/ospf
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-12-23 12:24:40 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2010-12-23 12:24:40 +0100
commit39847cda73d8e8536300b74d90d01b6e2f233ef7 (patch)
tree11c8e21b0fb7c208d7a9154ceb4ccb56da6f1e6d /proto/ospf
parentf0160f0e06be883528e5e29edfd509efa14d0c78 (diff)
downloadbird-39847cda73d8e8536300b74d90d01b6e2f233ef7.tar
bird-39847cda73d8e8536300b74d90d01b6e2f233ef7.zip
Add some comments.
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/rt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c
index 6b8886b..5469bdc 100644
--- a/proto/ospf/rt.c
+++ b/proto/ospf/rt.c
@@ -517,6 +517,13 @@ link_back(struct ospf_area *oa, struct top_hash_entry *en, struct top_hash_entry
if (!en || !par) return 0;
+ /* We should check whether there is a link back from en to par,
+ this is used in SPF calc (RFC 2328 16.1. (2b)). According to RFC 2328
+ note 23, we don't have to find the same link that is used for par
+ to en, any link is enough. This we do for ptp links. For net-rt
+ links, we have to find the same link to compute proper lb/lb_id,
+ which may be later used as the next hop. */
+
/* In OSPFv2, en->lb is set here. In OSPFv3, en->lb is just cleared here,
it is set in process_prefixes() to any global addres in the area */
@@ -556,6 +563,7 @@ link_back(struct ospf_area *oa, struct top_hash_entry *en, struct top_hash_entry
break;
case LSART_VLNK:
case LSART_PTP:
+ /* Not necessary the same link, see RFC 2328 [23] */
tmp = ospf_hash_find_rt(po->gr, oa->areaid, rtl->id);
if (tmp == par)
return 1;