diff options
author | Maria Matejka <mq@ucw.cz> | 2022-10-04 15:53:12 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-10-04 15:53:12 +0200 |
commit | 4e1c582caddb6876b9fcbdc29b8bad5ab0b09ee7 (patch) | |
tree | c46d8e5337bc12ec01e3d91b9c2f5f6dd61eb8ad /proto/bgp/bgp.h | |
parent | becca314e2546d6005a23398ce2d3012d4b396cb (diff) | |
parent | 71b434a987067475b517792360f58dbe03bfee9e (diff) |
Merge commit '71b434a9' into HEAD
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) |