summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-08-24 09:45:03 -0400
committerNick Mathewson <nickm@torproject.org>2017-08-24 09:45:03 -0400
commitb5c5086aba2fa24649fcbda7db80ef599d56e3c6 (patch)
tree6bbec1e92b1cd8e44ac91f35e1e604a1945c6b1f /src
parent35a29e81aea1712caada533dbdab4248612cc185 (diff)
parent3b646bf887f95c7f26ca05fb7fb3af10806b1328 (diff)
downloadtor-b5c5086aba2fa24649fcbda7db80ef599d56e3c6.tar.gz
tor-b5c5086aba2fa24649fcbda7db80ef599d56e3c6.zip
Merge branch 'bug23106_032'
Diffstat (limited to 'src')
-rw-r--r--src/or/onion.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/onion.c b/src/or/onion.c
index a98b97cb1d..7e1e89df1b 100644
--- a/src/or/onion.c
+++ b/src/or/onion.c
@@ -1219,7 +1219,7 @@ extend_cell_format(uint8_t *command_out, uint16_t *len_out,
*command_out = RELAY_COMMAND_EXTEND;
*len_out = 6 + TAP_ONIONSKIN_CHALLENGE_LEN + DIGEST_LEN;
set_uint32(p, tor_addr_to_ipv4n(&cell_in->orport_ipv4.addr));
- set_uint16(p+4, ntohs(cell_in->orport_ipv4.port));
+ set_uint16(p+4, htons(cell_in->orport_ipv4.port));
if (cell_in->create_cell.handshake_type == ONION_HANDSHAKE_TYPE_NTOR) {
memcpy(p+6, NTOR_CREATE_MAGIC, 16);
memcpy(p+22, cell_in->create_cell.onionskin, NTOR_ONIONSKIN_LEN);