if (!new)
{
- if (fn->x1 != EXT_EXPORT)
+ if (! (fn->flags & OSPF_RT_EXPORT))
return;
- flush_ext_lsa(oa, fn, 1);
- flush_ext_lsa(oa, fn, oa_is_nssa(oa));
++ flush_ext_lsa(oa, fn, 1, oa_is_nssa(oa));
/* Old external route might blocked some NSSA translation */
if (po->areano > 1)
originate_ext_lsa(po->backbone, fn, EXT_NSSA, anet->metric, IPA_NONE, anet->tag, 0);
/* RFC 3103 3.2 (2) - originate the same network */
- else if (decide_nssa_lsa(nf, &rt_metric, &rt_fwaddr, &rt_tag))
+ else if (decide_nssa_lsa(po, nf, &rt_metric, &rt_fwaddr, &rt_tag))
originate_ext_lsa(po->backbone, fn, EXT_NSSA, rt_metric, rt_fwaddr, rt_tag, 0);
- else if (fn->x1 == EXT_NSSA)
- flush_ext_lsa(po->backbone, fn, 0);
+ else if (fn->flags & OSPF_RT_NSSA)
- flush_ext_lsa(po->backbone, fn, 1);
++ flush_ext_lsa(po->backbone, fn, 1, 0);
}
/* RFC 2328 16.7. p2 - find new/lost vlink endpoints */
if (oa_is_nssa(oa) && oa->ac->default_nssa)
originate_ext_lsa(oa, &default_nf->fn, 0, oa->ac->default_cost, IPA_NONE, 0, 0);
else
- flush_ext_lsa(oa, &default_nf->fn, 0);
- flush_ext_lsa(oa, &default_nf->fn, 1);
--
++ flush_ext_lsa(oa, &default_nf->fn, 0, 1);
/* RFC 2328 16.4. (3) - precompute preferred ASBR entries */
if (oa_is_ext(oa))
}
void
- flush_ext_lsa(struct ospf_area *oa, struct fib_node *fn, int src)
-flush_ext_lsa(struct ospf_area *oa, struct fib_node *fn, int nssa)
++flush_ext_lsa(struct ospf_area *oa, struct fib_node *fn, int src, int nssa)
{
struct proto_ospf *po = oa->po;
struct proto *p = &po->proto;
void originate_sum_rt_lsa(struct ospf_area *oa, struct fib_node *fn, int metric, u32 options UNUSED);
void flush_sum_lsa(struct ospf_area *oa, struct fib_node *fn, int type);
void originate_ext_lsa(struct ospf_area *oa, struct fib_node *fn, int src, u32 metric, ip_addr fwaddr, u32 tag, int pbit);
- void flush_ext_lsa(struct ospf_area *oa, struct fib_node *fn, int src);
-void flush_ext_lsa(struct ospf_area *oa, struct fib_node *fn, int nssa);
++void flush_ext_lsa(struct ospf_area *oa, struct fib_node *fn, int src, int nssa);
+struct top_hash_entry * ospf_hash_find_rt(struct top_graph *f, u32 domain, u32 rtr);
+struct top_hash_entry * ospf_hash_find_rt3_first(struct top_graph *f, u32 domain, u32 rtr);
+struct top_hash_entry * ospf_hash_find_rt3_next(struct top_hash_entry *e);
-#ifdef OSPFv2
-struct top_hash_entry * ospf_hash_find_net(struct top_graph *f, u32 domain, u32 lsa);
+struct top_hash_entry * ospf_hash_find_net2(struct top_graph *f, u32 domain, u32 id);
+/* In OSPFv2, id is network IP prefix (lsa.id) while lsa.rt field is unknown
+ In OSPFv3, id is lsa.rt of DR while nif is neighbor iface id (lsa.id) */
static inline struct top_hash_entry *
-ospf_hash_find_rt(struct top_graph *f, u32 domain, u32 rtr)
+ospf_hash_find_net(struct top_graph *f, u32 domain, u32 id, u32 nif)
{
- return ospf_hash_find(f, domain, rtr, rtr, LSA_T_RT);
+ return f->ospf2 ?
+ ospf_hash_find_net2(f, domain, id) :
+ ospf_hash_find(f, domain, nif, id, LSA_T_NET);
}
-#else /* OSPFv3 */
-struct top_hash_entry * ospf_hash_find_rt(struct top_graph *f, u32 domain, u32 rtr);
-struct top_hash_entry * ospf_hash_find_rt_first(struct top_graph *f, u32 domain, u32 rtr);
-struct top_hash_entry * ospf_hash_find_rt_next(struct top_hash_entry *e);
-#endif
-
#endif /* _BIRD_OSPF_TOPOLOGY_H_ */
#define _BIRD_CONFIG_H_
/* BIRD version */
- #define BIRD_VERSION "1.3.7"
+ #define BIRD_VERSION "1.3.8"
+// XXXX temporary define
+#define IPV1 1
+
/* Include parameters determined by configure script */
#include "sysdep/autoconf.h"