]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Set is_relay_early to false when encoding relay msgs.
authorNick Mathewson <nickm@torproject.org>
Mon, 15 Sep 2025 13:20:15 +0000 (09:20 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 15 Sep 2025 13:20:15 +0000 (09:20 -0400)
Spotted by Alex Xu.

Fixes #41123; bug not in any released Tor.

src/core/or/relay.c

index 7a2ddef4a6b3a644830b0307c13d4bdbc02dfa9b..9c98796c5065a17a65131d2acf20f8e7b6ae1c23 100644 (file)
@@ -626,6 +626,9 @@ relay_send_command_from_edge_,(streamid_t stream_id, circuit_t *orig_circ,
     msg.length = payload_len;
     msg.body = (const uint8_t *) payload;
     msg_body_len = msg.length;
+    // If this cell should be RELAY_EARLY, we'll change the type
+    // later in this function.
+    msg.is_relay_early = false;
 
     if (relay_msg_encode_cell(cell_format, &msg, &cell) < 0) {
       // We already called IF_BUG_ONCE in relay_msg_encode_cell.