From 481bf0bbe926246e7017584b8b5cba310054f8aa Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 8 Aug 2022 15:33:07 +0100 Subject: [PATCH] tor-proto channel padding: Document PADDING_NEGOTIATE overwriting As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2825979 --- crates/tor-proto/src/channel/reactor.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/tor-proto/src/channel/reactor.rs b/crates/tor-proto/src/channel/reactor.rs index 8935e8d91..a69289922 100644 --- a/crates/tor-proto/src/channel/reactor.rs +++ b/crates/tor-proto/src/channel/reactor.rs @@ -278,6 +278,9 @@ impl Reactor { } } if let Some(padding_negotiate) = padding_negotiate { + // This replaces any previous PADDING_NEGOTIATE cell that we were + // told to send, but which we didn't manage to send yet. + // It doesn't make sense to queue them up. self.special_outgoing.padding_negotiate = Some(padding_negotiate.clone()); } }