From: Ondrej Zajicek Date: Sat, 12 Jan 2013 22:28:05 +0000 (+0100) Subject: Merge commit '94e2f1c111721d6213ea65cac5c53036e38e3973' into integrated X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cbe7edbd8112a0e57f46761799567ac39f64c4d;p=thirdparty%2Fbird.git Merge commit '94e2f1c111721d6213ea65cac5c53036e38e3973' into integrated --- 1cbe7edbd8112a0e57f46761799567ac39f64c4d diff --cc proto/ospf/ospf.c index 598867588,aa62da145..9a7eaa63b --- a/proto/ospf/ospf.c +++ b/proto/ospf/ospf.c @@@ -563,10 -572,10 +563,10 @@@ ospf_rt_notify(struct proto *p, rtable 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) diff --cc proto/ospf/rt.c index e3ad9d1af,4b8de4b83..bf9b2adf8 --- a/proto/ospf/rt.c +++ b/proto/ospf/rt.c @@@ -971,11 -1062,11 +971,11 @@@ check_nssa_lsa(struct proto_ospf *po, o 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 */ @@@ -1096,8 -1189,8 +1096,7 @@@ ospf_rt_abr1(struct proto_ospf *po 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)) diff --cc proto/ospf/topology.c index fe0caf9d8,ec012b220..91b7810ab --- a/proto/ospf/topology.c +++ b/proto/ospf/topology.c @@@ -1111,7 -1131,7 +1111,7 @@@ originate_ext_lsa(struct ospf_area *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; diff --cc proto/ospf/topology.h index 3b5047206,cb8764878..5858e11a9 --- a/proto/ospf/topology.h +++ b/proto/ospf/topology.h @@@ -70,23 -72,23 +70,23 @@@ void originate_sum_net_lsa(struct ospf_ 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_ */ diff --cc sysdep/config.h index c01543874,7106e4bab..76a4af644 --- a/sysdep/config.h +++ b/sysdep/config.h @@@ -7,11 -7,8 +7,11 @@@ #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"