diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-07-09 15:57:46 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-07-09 15:57:46 +0200 |
commit | deb84d79896cca3ac10ff9f853604f845c9420a7 (patch) | |
tree | 17876c3009bc321c3816a2c2039c06dff6f83090 | |
parent | e840cb9cd54162efca72137f53fddbb0e490d6fe (diff) |
OSPF: Minor fix in graceful restart
Most LSA origination is blocked in ospf_update_topology(), this fix
blocks LSA origination from ospf_rt_spf().
-rw-r--r-- | proto/ospf/topology.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c index a5875770..2e9c3965 100644 --- a/proto/ospf/topology.c +++ b/proto/ospf/topology.c @@ -281,11 +281,15 @@ ospf_do_originate_lsa(struct ospf_proto *p, struct top_hash_entry *en, void *lsa struct top_hash_entry * ospf_originate_lsa(struct ospf_proto *p, struct ospf_new_lsa *lsa) { - struct top_hash_entry *en; + struct top_hash_entry *en = NULL; void *lsa_body = p->lsab; u16 lsa_blen = p->lsab_used; u16 lsa_length = sizeof(struct ospf_lsa_header) + lsa_blen; + /* RFC 3623 2 (1) - do not originate topology LSAs during graceful restart */ + if (p->gr_recovery && (LSA_FUNCTION(lsa->type) <= LSA_FUNCTION(LSA_T_NSSA))) + goto drop; + /* For OSPFv2 Opaque LSAs, LS ID consists of Opaque Type and Opaque ID */ if (ospf_is_v2(p) && lsa_is_opaque(lsa->type)) lsa->id |= (u32) lsa_get_opaque_type(lsa->type) << 24; |