diff options
author | Josh Bailey <joshb@google.com> | 2011-07-20 20:49:11 -0700 |
---|---|---|
committer | Josh Bailey <joshb@google.com> | 2011-07-20 20:49:11 -0700 |
commit | 0b597ef00ec7c7eebd836e2b1d5a266efcd60005 (patch) | |
tree | 818852fc775358cadb0178c15226af63cfb06759 /bgpd/bgp_mpath.h | |
parent | 6918e74b97fd40f947ebd2eded9ab24b8569d3b8 (diff) |
bgpd: When advertising a multipath route, the attribute set to be
advertised is based on the bestpath attribute set, but the
following attributes are aggregated from the attribute sets
of the multipath constituents:
- AS_PATH
- ORIGIN
- COMMUNITIES
- EXTENDED COMMUNITIES
In addition the route is advertised with the NEXT_HOP set
to the router's interface IP address, instead of the NEXT_HOP
of the best path. This is to ensure that traffic will go to this
router so it can be fanned out via the multipath route.
* bgpd/ecommunity.c
* ecommunity_uniq_sort(): Make this function externally accessible
* bgpd/ecommunity.h
* Add external declaration for ecommunity_uniq_sort()
* bgpd/bgp_mpath.c
* bgp_info_nexthop_cmp(): Replace calls to bgp_attr_extra_get()
to avoid unwanted memory allocation
* bgp_info_mpath_free(): Free aggregate attribute for multipath
* bgp_info_mpath_attr(): Lookup aggregate attribute of a multipath route
* bgp_info_mpath_attr_set(): Set aggregate attribute of a multipath route
* bgp_info_mpath_aggregate_update(): Update the aggregate attribute
of a multipath route
* bgpd/bgp_mpath.h
* bgp_info_mpath: Add pointer to hold aggregate attribute of a multipath
* Add external declarations for new functions
* bgpd/bgp_route.c
* bgp_announce_check(): Use aggregate attribute when announcing multipath
route
* bgp_announce_check_rsclient(): Use aggregate attribute when announcing
multipath route
* bgp_best_selection(): After updating multipath set, update the
multipath aggregate attribute
Diffstat (limited to 'bgpd/bgp_mpath.h')
-rw-r--r-- | bgpd/bgp_mpath.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bgpd/bgp_mpath.h b/bgpd/bgp_mpath.h index 3712493e..37b9ac8b 100644 --- a/bgpd/bgp_mpath.h +++ b/bgpd/bgp_mpath.h @@ -43,6 +43,9 @@ struct bgp_info_mpath /* When attached to best path, the number of selected multipaths */ u_int32_t mp_count; + + /* Aggregated attribute for advertising multipath route */ + struct attr *mp_attr; }; /* Functions to support maximum-paths configuration */ @@ -59,6 +62,8 @@ extern void bgp_mp_dmed_deselect (struct bgp_info *); extern void bgp_info_mpath_update (struct bgp_node *, struct bgp_info *, struct bgp_info *, struct list *, struct bgp_maxpaths_cfg *); +extern void bgp_info_mpath_aggregate_update (struct bgp_info *, + struct bgp_info *); /* Unlink and free multipath information associated with a bgp_info */ extern void bgp_info_mpath_dequeue (struct bgp_info *); @@ -70,5 +75,6 @@ extern struct bgp_info *bgp_info_mpath_next (struct bgp_info *); /* Accessors for multipath information */ extern u_int32_t bgp_info_mpath_count (struct bgp_info *); +extern struct attr *bgp_info_mpath_attr (struct bgp_info *); #endif /* _QUAGGA_BGP_MPATH_H */ |