summaryrefslogtreecommitdiff
path: root/bgpd/bgp_nht.c
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2022-04-29 19:41:57 +0200
committerLouis Scalbert <louis.scalbert@6wind.com>2022-12-16 15:07:00 +0100
commit667a4e92da1d789b5aa3da15c3f80d3f4658a53e (patch)
tree23e151fb05db755f1b768c261caa1c1a9e442b0c /bgpd/bgp_nht.c
parent86a1c2963266fe5a0683278668c276c748f32552 (diff)
bgpd: move mp_nexthop_prefer_global boolean attribute to nh_flag
Previous commits have introduced a new 8 bits nh_flag in the attr struct that has increased the memory footprint. Move the mp_nexthop_prefer_global boolean in the attr structure that takes 8 bits to the new nh_flag in order to go back to the previous memory utilization. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'bgpd/bgp_nht.c')
-rw-r--r--bgpd/bgp_nht.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index a192b037ac..b6b0c584d7 100644
--- a/bgpd/bgp_nht.c
+++ b/bgpd/bgp_nht.c
@@ -1005,7 +1005,8 @@ static int make_prefix(int afi, struct bgp_path_info *pi, struct prefix *p)
*/
else if (pi->attr->mp_nexthop_len
== BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL) {
- if (pi->attr->mp_nexthop_prefer_global)
+ if (CHECK_FLAG(pi->attr->nh_flag,
+ BGP_ATTR_NH_MP_PREFER_GLOBAL))
p->u.prefix6 =
pi->attr->mp_nexthop_global;
else