]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge commit '94e2f1c111721d6213ea65cac5c53036e38e3973' into integrated
authorOndrej Zajicek <santiago@crfreenet.org>
Sat, 12 Jan 2013 22:28:05 +0000 (23:28 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Sat, 12 Jan 2013 22:28:05 +0000 (23:28 +0100)
1  2 
nest/proto.c
nest/protocol.h
proto/ospf/ospf.c
proto/ospf/rt.c
proto/ospf/topology.c
proto/ospf/topology.h
sysdep/config.h

diff --cc nest/proto.c
Simple merge
diff --cc nest/protocol.h
Simple merge
index 598867588594a66a0cb099d6ec5aab5af88a75cc,aa62da145ebe6d559c795a9e0d0c685e11eb0570..9a7eaa63bb5635a3f922d899eac6fee3f18a5f87
@@@ -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 e3ad9d1af449444d8ad299fc2bb530215d3ecc0c,4b8de4b8325c80ee4b944c646150026735e53c5a..bf9b2adf81f1a109f7b02a3bd9a3db0d8f1689ee
@@@ -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))
index fe0caf9d84a409fd73d3340981e4a711b738c95d,ec012b2200a7c960c6398fea3520eb122f9b1399..91b7810ab3bb7b3e41b14f9942402acaa262620b
@@@ -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;
index 3b5047206e25b10e5b92f1650a5d741ccbd06d8d,cb876487845e4084c7301eb61e0921900d95ff0f..5858e11a948d843045200cb200d801b568b9df5a
@@@ -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 c015438744b0967fd3983aa575f900f442a91cdf,7106e4babf5648a9f6ab84254f65577d7d392920..76a4af6448061258d33642789950a02c70d02281
@@@ -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"