mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 13:43:47 +01:00
test_cfmt_connected_cells: use TTL value that's above the new min.
Related to 19769.
This commit is contained in:
parent
609065f165
commit
a969ae8e21
@ -345,9 +345,9 @@ test_cfmt_connected_cells(void *arg)
|
|||||||
memset(&cell, 0, sizeof(cell));
|
memset(&cell, 0, sizeof(cell));
|
||||||
tor_addr_parse(&addr, "30.40.50.60");
|
tor_addr_parse(&addr, "30.40.50.60");
|
||||||
rh.length = connected_cell_format_payload(cell.payload+RELAY_HEADER_SIZE,
|
rh.length = connected_cell_format_payload(cell.payload+RELAY_HEADER_SIZE,
|
||||||
&addr, 128);
|
&addr, 1024);
|
||||||
tt_int_op(rh.length, OP_EQ, 8);
|
tt_int_op(rh.length, OP_EQ, 8);
|
||||||
test_memeq_hex(cell.payload+RELAY_HEADER_SIZE, "1e28323c" "00000080");
|
test_memeq_hex(cell.payload+RELAY_HEADER_SIZE, "1e28323c" "00000e10");
|
||||||
|
|
||||||
/* Try parsing it. */
|
/* Try parsing it. */
|
||||||
tor_addr_make_unspec(&addr);
|
tor_addr_make_unspec(&addr);
|
||||||
@ -355,7 +355,7 @@ test_cfmt_connected_cells(void *arg)
|
|||||||
tt_int_op(r, OP_EQ, 0);
|
tt_int_op(r, OP_EQ, 0);
|
||||||
tt_int_op(tor_addr_family(&addr), OP_EQ, AF_INET);
|
tt_int_op(tor_addr_family(&addr), OP_EQ, AF_INET);
|
||||||
tt_str_op(fmt_addr(&addr), OP_EQ, "30.40.50.60");
|
tt_str_op(fmt_addr(&addr), OP_EQ, "30.40.50.60");
|
||||||
tt_int_op(ttl, OP_EQ, 128);
|
tt_int_op(ttl, OP_EQ, 3600); /* not 1024, since we clipped to 3600 */
|
||||||
|
|
||||||
/* Try an IPv6 address */
|
/* Try an IPv6 address */
|
||||||
memset(&rh, 0, sizeof(rh));
|
memset(&rh, 0, sizeof(rh));
|
||||||
|
Loading…
Reference in New Issue
Block a user