diff options
author | Maria Matejka <mq@ucw.cz> | 2022-08-02 22:08:59 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-08-02 22:08:59 +0200 |
commit | 71b434a987067475b517792360f58dbe03bfee9e (patch) | |
tree | a6bad599a80fd6dd16b0117f16e95a5c213cfe8d /proto/bgp/bgp.h | |
parent | 0072d11f3431165240656edf6ade473554b8747e (diff) | |
parent | f0507f05ce57398e135651896dace4cb68eeed54 (diff) |
Merge commit 'f0507f05ce57398e135651896dace4cb68eeed54' into thread-next
Diffstat (limited to 'proto/bgp/bgp.h')
-rw-r--r-- | proto/bgp/bgp.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h index 469f0cb9..81382099 100644 --- a/proto/bgp/bgp.h +++ b/proto/bgp/bgp.h @@ -535,6 +535,7 @@ rte_resolvable(const rte *rt) return NEXTHOP_IS_REACHABLE(nhad) || (nhad->dest != RTD_UNREACHABLE); } +extern struct rte_owner_class bgp_rte_owner_class; #ifdef LOCAL_DEBUG #define BGP_FORCE_DEBUG 1 @@ -585,6 +586,12 @@ int bgp_preexport(struct channel *, struct rte *); void bgp_get_route_info(struct rte *, byte *); int bgp_total_aigp_metric_(const rte *e, u64 *metric, const struct adata **ad); +static inline struct bgp_proto *bgp_rte_proto(struct rte *rte) +{ + return (rte->src->owner->class == &bgp_rte_owner_class) ? + SKIP_BACK(struct bgp_proto, p.sources, rte->src->owner) : NULL; +} + #define BGP_AIGP_METRIC 1 #define BGP_AIGP_MAX U64(0xffffffffffffffff) |