summaryrefslogtreecommitdiff
path: root/proto/ospf/lsupd.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-01-24 22:34:33 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-01-24 22:45:27 +0100
commit5a50a98980a3554b66cedda6992ece4063a0e85a (patch)
treed8ff938c5b9712ca7788256aab3fff96f98ad7ac /proto/ospf/lsupd.c
parent3e60932a289e55e212dec1cbaf3bca44b2bbaeb8 (diff)
OSPF: Opaque LSAs and Router Information LSA
Add support for OSPFv2 Opaque LSAs (RFC 5250) and for Router Information LSA (RFC 7770). The second part is here mainly for testing opaque LSAs.
Diffstat (limited to 'proto/ospf/lsupd.c')
-rw-r--r--proto/ospf/lsupd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c
index a98c9098..7318b751 100644
--- a/proto/ospf/lsupd.c
+++ b/proto/ospf/lsupd.c
@@ -171,7 +171,8 @@ ospf_add_flushed_to_lsrt(struct ospf_proto *p, struct ospf_neighbor *n)
WALK_SLIST(en, p->lsal)
if ((en->lsa.age == LSA_MAXAGE) && (en->lsa_body != NULL) &&
- lsa_flooding_allowed(en->lsa_type, en->domain, n->ifa))
+ lsa_flooding_allowed(en->lsa_type, en->domain, n->ifa) &&
+ lsa_is_acceptable(en->lsa_type, n, p))
ospf_lsa_lsrt_up(en, n);
/* If we found any flushed LSA, we send them ASAP */
@@ -287,9 +288,9 @@ ospf_flood_lsa(struct ospf_proto *p, struct top_hash_entry *en, struct ospf_neig
if (n == from)
continue;
- /* In OSPFv3, there should be check whether receiving router understand
- that type of LSA (for LSA types with U-bit == 0). But as we do not support
- any optional LSA types, this is not needed yet */
+ /* Check whether optional LSAs are supported by neighbor */
+ if (!lsa_is_acceptable(en->lsa_type, n, p))
+ continue;
/* 13.3 (1d) - add LSA to the link state retransmission list */
ospf_lsa_lsrt_up(en, n);