Skip to content
Snippets Groups Projects
Commit b96154da authored by Charlie Root's avatar Charlie Root
Browse files

Simplify condition.

No functional change.
parent a163898a
No related branches found
No related tags found
No related merge requests found
...@@ -2409,14 +2409,8 @@ static int do_inbound_script_packet( ...@@ -2409,14 +2409,8 @@ static int do_inbound_script_packet(
} }
break; break;
case SCTP_COOKIE_ECHO_CHUNK_TYPE: case SCTP_COOKIE_ECHO_CHUNK_TYPE:
if (!(item->flags & FLAG_CHUNK_VALUE_NOCHECK)) break; // if the cookie was explicitly if ((socket->state == SOCKET_PASSIVE_INIT_ACK_SENT) &&
// added to the test script, we dont (item->flags & FLAG_CHUNK_VALUE_NOCHECK)) {
// need to copy the saved cookie
// from the init_ack chunk ...
// TODO: can this be done in a more readable way?
if (socket->state == SOCKET_PASSIVE_INIT_ACK_SENT) {
temp_offset = socket->prepared_cookie_echo_length - item->length; temp_offset = socket->prepared_cookie_echo_length - item->length;
assert(packet->ip_bytes + temp_offset <= packet->buffer_bytes); assert(packet->ip_bytes + temp_offset <= packet->buffer_bytes);
memmove((u8 *)item->chunk + item->length + temp_offset, memmove((u8 *)item->chunk + item->length + temp_offset,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment