From 25b20638e57763bb1bf7c8b948c714bd1a99e50a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diva=20Mart=C3=ADnez?= Date: Thu, 20 Nov 2025 10:41:01 -0500 Subject: [PATCH] track sent add and remove address in stats and sent frames --- quinn-proto/src/connection/mod.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/quinn-proto/src/connection/mod.rs b/quinn-proto/src/connection/mod.rs index 3e2df2cf2..4da0bcce0 100644 --- a/quinn-proto/src/connection/mod.rs +++ b/quinn-proto/src/connection/mod.rs @@ -5300,6 +5300,11 @@ impl Connection { while space_id == SpaceId::Data && frame::AddAddress::SIZE_BOUND <= buf.remaining_mut() { if let Some(added_address) = space.pending.add_address.pop_last() { added_address.write(buf); + sent.retransmits + .get_or_create() + .add_address + .insert(added_address); + self.stats.frame_tx.add_address = self.stats.frame_tx.add_address.saturating_add(1); } else { break; } @@ -5308,6 +5313,12 @@ impl Connection { while space_id == SpaceId::Data && frame::RemoveAddress::SIZE_BOUND <= buf.remaining_mut() { if let Some(removed_address) = space.pending.remove_address.pop_last() { removed_address.write(buf); + sent.retransmits + .get_or_create() + .remove_address + .insert(removed_address); + self.stats.frame_tx.remove_address = + self.stats.frame_tx.remove_address.saturating_add(1); } else { break; }