Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Scalbert <[email protected]>
  • Loading branch information
louis-6wind committed Feb 5, 2024
1 parent 8838fda commit f4084ab
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions bgpd/bgp_evpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1565,22 +1565,22 @@ static int update_evpn_type5_route_entry(struct bgp *bgp_evpn,
/* See if this is an update of an existing route, or a new add. */
local_pi = bgp_evpn_route_get_local_path(bgp_evpn, dest);


local_attr = *attr;
/* Type-5 routes advertise the L3-VNI */
vni2label(bgp_vrf->l3vni, &label);
local_attr.label_tbl[0] = label;
assert(label);
local_attr.num_labels = 1;

/*
* create a new route entry if one doesn't exist.
* Otherwise see if route attr has changed
*/
if (!local_pi) {

/* route has changed as this is the first entry */
*route_changed = 1;

local_attr = *attr;

/* Type-5 routes advertise the L3-VNI */
vni2label(bgp_vrf->l3vni, &label);
local_attr.label_tbl[0] = label;
local_attr.num_labels = 1;

/* Add (or update) attribute to hash. */
attr_new = bgp_attr_intern(&local_attr);

Expand All @@ -1594,14 +1594,14 @@ static int update_evpn_type5_route_entry(struct bgp *bgp_evpn,
} else {

tmp_pi = local_pi;
if (!attrhash_cmp(tmp_pi->attr, attr)) {
if (!attrhash_cmp(tmp_pi->attr, &local_attr)) {

/* attribute changed */
*route_changed = 1;

/* The attribute has changed. */
/* Add (or update) attribute to hash. */
attr_new = bgp_attr_intern(attr);
attr_new = bgp_attr_intern(&local_attr);
bgp_path_info_set_flag(dest, tmp_pi,
BGP_PATH_ATTR_CHANGED);

Expand Down

0 comments on commit f4084ab

Please sign in to comment.