mirror of
https://github.com/openbsd/src.git
synced 2026-06-18 07:13:36 +02:00
Revert a small part of the earlier adjout_prefix_dump diff.
In up_process_prefix() bring back the path_id_tx hack for regular peers. A peer not using add-path send will set the path_id_tx to 0 and so adjout_prefix_first() will return the right match. This was undone because there is a problem with this when a peer switches mode (from add-path send back to no add-path). adjout_prefix_first() returns a prefix where path_id_tx is not 0 but adjout_prefix_update() expects that to be 0. This edge case is far less common and a better workaround can be found here. Fixes the addpath intergration test.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: rde_update.c,v 1.197 2026/05/28 09:10:22 claudio Exp $ */
|
||||
/* $OpenBSD: rde_update.c,v 1.198 2026/05/28 14:01:46 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
|
||||
@@ -164,6 +164,7 @@ up_process_prefix(struct rde_peer *peer, struct prefix *new,
|
||||
struct filterstate state;
|
||||
struct bgpd_addr addr;
|
||||
int excluded = 0;
|
||||
uint32_t new_path_id_tx = 0;
|
||||
|
||||
/*
|
||||
* up_test_update() needs to run before the output filters
|
||||
@@ -194,11 +195,13 @@ up_process_prefix(struct rde_peer *peer, struct prefix *new,
|
||||
}
|
||||
|
||||
/* from here on we know this is an update */
|
||||
if (p == (void *)-1)
|
||||
if (p == (void *)-1) {
|
||||
new_path_id_tx = new->path_id_tx;
|
||||
p = adjout_prefix_get(peer, new->path_id_tx, new->pt);
|
||||
}
|
||||
|
||||
up_prep_adjout(peer, &state, new->pt->aid);
|
||||
adjout_prefix_update(p, peer, &state, new->pt, new->path_id_tx,
|
||||
adjout_prefix_update(p, peer, &state, new->pt, new_path_id_tx,
|
||||
force_update);
|
||||
rde_filterstate_clean(&state);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user