diff options
author | Maria Matejka <mq@ucw.cz> | 2022-03-09 11:01:44 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-03-09 11:02:55 +0100 |
commit | 24773af9e099530aa6ccf4c730ad31c452284228 (patch) | |
tree | 373d1835e6b16a4946690fa467f89eba8b0a58b7 /proto/bgp/attrs.c | |
parent | 83d9920f90738e4df75b3cf57335b43c094051cd (diff) | |
parent | e42eedb912428aa9af450b0426e53b0a7004dfb1 (diff) |
Merge commit 'e42eedb9' into haugesund
Diffstat (limited to 'proto/bgp/attrs.c')
-rw-r--r-- | proto/bgp/attrs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index 09c0bc57..6963833a 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -374,6 +374,13 @@ bgp_init_aigp_metric(rte *e, u64 *metric, const struct adata **ad) return *metric < IGP_METRIC_UNKNOWN; } +u32 +bgp_rte_igp_metric(struct rte *rt) +{ + u64 metric = bgp_total_aigp_metric(rt); + return (u32) MIN(metric, (u64) IGP_METRIC_UNKNOWN); +} + /* * Attribute hooks |