]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge branch 'quagga' into google-bgp-multipath
authorAvneesh Sachdev <avneesh@opensourcerouting.org>
Mon, 9 Apr 2012 07:25:15 +0000 (00:25 -0700)
committerAvneesh Sachdev <avneesh@opensourcerouting.org>
Mon, 9 Apr 2012 07:25:15 +0000 (00:25 -0700)
Conflicts:
bgpd/bgp_route.c

13 files changed:
1  2 
bgpd/bgp_aspath.c
bgpd/bgp_aspath.h
bgpd/bgp_ecommunity.c
bgpd/bgp_ecommunity.h
bgpd/bgp_main.c
bgpd/bgp_route.c
bgpd/bgp_route.h
bgpd/bgp_vty.c
bgpd/bgp_zebra.c
bgpd/bgp_zebra.h
bgpd/bgpd.c
bgpd/bgpd.h
lib/memtypes.c

Simple merge
Simple merge
Simple merge
index 1a2252709466fb63aaea589151812d51e2962fd1,2f59dc4098a7f6f24f06b809f883287002e50577..92affccca406278820520ff464aacd2678f0a71f
@@@ -71,10 -71,9 +71,10 @@@ extern void ecommunity_free (struct eco
  extern struct ecommunity *ecommunity_parse (u_int8_t *, u_short);
  extern struct ecommunity *ecommunity_dup (struct ecommunity *);
  extern struct ecommunity *ecommunity_merge (struct ecommunity *, struct ecommunity *);
 +extern struct ecommunity *ecommunity_uniq_sort (struct ecommunity *);
  extern struct ecommunity *ecommunity_intern (struct ecommunity *);
  extern int ecommunity_cmp (const void *, const void *);
- extern void ecommunity_unintern (struct ecommunity *);
+ extern void ecommunity_unintern (struct ecommunity **);
  extern unsigned int ecommunity_hash_make (void *);
  extern struct ecommunity *ecommunity_str2com (const char *, int, int);
  extern char *ecommunity_ecom2str (struct ecommunity *, int);
diff --cc bgpd/bgp_main.c
Simple merge
index a4923f57bb529d56e9ad2744d0c6e75e73ca4c35,ba530321a59467d2734499c74b54f627c5f5ecdf..087f83961446e6c5f3d23608e55a2d0bce1faf33
@@@ -138,10 -137,9 +138,10 @@@ static voi
  bgp_info_free (struct bgp_info *binfo)
  {
    if (binfo->attr)
-     bgp_attr_unintern (binfo->attr);
+     bgp_attr_unintern (&binfo->attr);
    
    bgp_info_extra_free (&binfo->extra);
 +  bgp_info_mpath_free (&binfo->mpath);
  
    peer_unlock (binfo->peer); /* bgp_info peer reference */
  
@@@ -1092,13 -1069,9 +1092,11 @@@ bgp_announce_check_rsclient (struct bgp
    struct bgp_filter *filter;
    struct bgp_info info;
    struct peer *from;
-   struct bgp *bgp;
 +  struct attr *riattr;
  
    from = ri->peer;
    filter = &rsclient->filter[afi][safi];
-   bgp = rsclient->bgp;
 +  riattr = bgp_info_mpath_count (ri) ? bgp_info_mpath_attr (ri) : ri->attr;
  
    if (DISABLE_BGP_ANNOUNCE)
      return 0;
@@@ -1566,11 -1490,9 +1564,11 @@@ bgp_process_main (struct work_queue *wq
      {
        if (! CHECK_FLAG (old_select->flags, BGP_INFO_ATTR_CHANGED))
          {
 -          if (CHECK_FLAG (old_select->flags, BGP_INFO_IGP_CHANGED))
 +          if (CHECK_FLAG (old_select->flags, BGP_INFO_IGP_CHANGED) ||
 +            CHECK_FLAG (old_select->flags, BGP_INFO_MULTIPATH_CHG))
-             bgp_zebra_announce (p, old_select, bgp);
+             bgp_zebra_announce (p, old_select, bgp, safi);
            
 +        UNSET_FLAG (old_select->flags, BGP_INFO_MULTIPATH_CHG);
            UNSET_FLAG (rn->flags, BGP_NODE_PROCESS_SCHEDULED);
            return WQ_SUCCESS;
          }
Simple merge
diff --cc bgpd/bgp_vty.c
Simple merge
index 6c21230a041a1a1a2d8d86943a647df089a21b51,20feba0f49830119b671a4183eac8f7308864328..5c0dbb8871798747ab8d20f3cee883b30a96549c
@@@ -703,9 -678,10 +706,10 @@@ bgp_zebra_announce (struct prefix *p, s
  
        api.type = ZEBRA_ROUTE_BGP;
        api.message = 0;
+       api.safi = safi;
        SET_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP);
 -      api.nexthop_num = 1;
 -      api.nexthop = &nexthop;
 +      api.nexthop_num = 1 + bgp_info_mpath_count (info);
 +      api.nexthop = (struct in_addr **)STREAM_DATA (bgp_nexthop_buf);
        api.ifindex_num = 0;
        SET_FLAG (api.message, ZAPI_MESSAGE_METRIC);
        api.metric = info->attr->med;
index 461255e3935f7c4adbf4f50182075ed0f9488b17,1351333f739d42424882d088820879322abd07f6..80991930f3132927c1fa08833a752698ffe6a53d
@@@ -21,18 -21,12 +21,18 @@@ Boston, MA 02111-1307, USA.  *
  #ifndef _QUAGGA_BGP_ZEBRA_H
  #define _QUAGGA_BGP_ZEBRA_H
  
 +#define BGP_NEXTHOP_BUF_SIZE (8 * sizeof (struct in_addr *))
 +
 +extern struct stream *bgp_nexthop_buf;
 +
  extern void bgp_zebra_init (void);
  extern int bgp_if_update_all (void);
 +extern int bgp_config_write_maxpaths (struct vty *, struct bgp *, afi_t,
 +                                    safi_t, int *);
  extern int bgp_config_write_redistribute (struct vty *, struct bgp *, afi_t, safi_t,
                                   int *);
- extern void bgp_zebra_announce (struct prefix *, struct bgp_info *, struct bgp *);
- extern void bgp_zebra_withdraw (struct prefix *, struct bgp_info *);
+ extern void bgp_zebra_announce (struct prefix *, struct bgp_info *, struct bgp *, safi_t);
+ extern void bgp_zebra_withdraw (struct prefix *, struct bgp_info *, safi_t);
  
  extern int bgp_redistribute_set (struct bgp *, afi_t, int);
  extern int bgp_redistribute_rmap_set (struct bgp *, afi_t, int, const char *);
diff --cc bgpd/bgpd.c
Simple merge
diff --cc bgpd/bgpd.h
Simple merge
diff --cc lib/memtypes.c
Simple merge