summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2024-01-30 15:18:43 +0100
committerLouis Scalbert <louis.scalbert@6wind.com>2024-01-30 15:24:32 +0100
commit5c0aab103d3445d4516782915367625e0424431f (patch)
treed1366fbe002d0966e538c8d11711ab7a8013928b /bgpd
parentMerge pull request #15238 from louis-6wind/bgp-leak-network (diff)
downloadfrr-5c0aab103d3445d4516782915367625e0424431f.tar.xz
frr-5c0aab103d3445d4516782915367625e0424431f.zip
bgpd: fix attr comparaison bgp_adj_in_set
In bgp_adj_in_set(), attr has not yet been interned. adj->attr is always different from attr. adj->attr is always uninterned and interned even if attr and adj->attr are identical. Fix the comparison. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_advertise.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_advertise.c b/bgpd/bgp_advertise.c
index 2ca3ffaa1..a81f288c7 100644
--- a/bgpd/bgp_advertise.c
+++ b/bgpd/bgp_advertise.c
@@ -169,7 +169,7 @@ void bgp_adj_in_set(struct bgp_dest *dest, struct peer *peer, struct attr *attr,
for (adj = dest->adj_in; adj; adj = adj->next) {
if (adj->peer == peer && adj->addpath_rx_id == addpath_id) {
- if (adj->attr != attr) {
+ if (!attrhash_cmp(adj->attr, attr)) {
bgp_attr_unintern(&adj->attr);
adj->attr = bgp_attr_intern(attr);
}