diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2021-08-23 23:22:20 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2021-08-24 16:53:36 +0200 |
commit | aea082d5788beea758113797e41ef7152470ca2f (patch) | |
tree | e01e7f18def6e5cde31126a2a624133b04c7696b /ospf6d/ospf6_asbr.c | |
parent | tests: enable more debugs in the ospf6_topo2 topotest (diff) | |
download | frr-aea082d5788beea758113797e41ef7152470ca2f.tar.xz frr-aea082d5788beea758113797e41ef7152470ca2f.zip |
ospf6d: further validate NSSA ASBR routes used for route computation
Add missing sanity check specified in the NSSA RFC.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_asbr.c')
-rw-r--r-- | ospf6d/ospf6_asbr.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 92f9f0694..acecf9002 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -570,6 +570,22 @@ void ospf6_asbr_lsa_add(struct ospf6_lsa *lsa) &asbr_id); return; } + + /* + * RFC 3101 - Section 2.5: + * "For a Type-7 LSA the matching routing table entry must + * specify an intra-area path through the LSA's originating + * NSSA". + */ + if (ntohs(lsa->header->type) == OSPF6_LSTYPE_TYPE_7 + && (asbr_entry->path.area_id != oa->area_id + || asbr_entry->path.type != OSPF6_PATH_TYPE_INTRA)) { + if (IS_OSPF6_DEBUG_EXAMIN(AS_EXTERNAL)) + zlog_debug( + "Intra-area route to NSSA ASBR not found: %pFX", + &asbr_id); + return; + } } /* Check the forwarding address */ |