]> git.ipfire.org Git - thirdparty/tor.git/commit
Change relay_msg_t to _not_ hold a copy of the message.
authorNick Mathewson <nickm@torproject.org>
Fri, 18 Apr 2025 01:15:30 +0000 (21:15 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 5 May 2025 17:07:37 +0000 (13:07 -0400)
commit120305c7f3a9a5103e103fa557221bff2a8082b8
tree9191d393ec09fc63af531adb43c4ff5857de5fb3
parent89d870d32816c32a220f59debc1d8f3469e97a9a
Change relay_msg_t to _not_ hold a copy of the message.

Previously we had to memdup every time we parsed a relay_msg_t;
but that's unnecessary, since (most) every time we use it, we have
a longer-lived cell object.

This _did_ require some hacking in relay_msg_copy, but I think the
gain in simplicity is worth it.
src/core/or/relay.c
src/core/or/relay_msg.c
src/core/or/relay_msg.h
src/core/or/relay_msg_st.h
src/test/test_cell_formats.c
src/test/test_circuitbuild.c
src/test/test_circuitpadding.c
src/test/test_conflux_cell.c
src/test/test_relaycell.c