Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decode AccECN nicely with -v and on error #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions gtests/net/packetdrill/run_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,10 @@ static int verify_outbound_live_packet(
add_packet_dump(error, "script", script_packet, script_usecs,
DUMP_SHORT);
if (actual_packet != NULL) {
if (script_packet->flags & FLAG_PARSE_ACE) {
/* set numeric ACE count flag on actual packet as well */
actual_packet->flags |= FLAG_PARSE_ACE;
}
add_packet_dump(error, "actual", actual_packet, actual_usecs,
DUMP_SHORT);
packet_free(actual_packet);
Expand Down Expand Up @@ -1589,6 +1593,10 @@ static int do_outbound_script_packet(
DEBUGP("SYNACK script.local_isn: %u\n",
socket->script.local_isn);
}
if (packet->flags & FLAG_PARSE_ACE) {
/* set numeric ACE count flag on actual packet as well */
live_packet->flags |= FLAG_PARSE_ACE;
}

DEBUGP("Expecting packet with payload %d bytes\n",
expected_payload_len);
Expand Down
2 changes: 1 addition & 1 deletion gtests/net/packetdrill/tcp_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static inline int tcp_flag_ace_count(const char *flags)

for (s = flags; *s != '\0'; ++s) {
if (strchr(ace_tcp_flags, *s))
return ((int)*s - (int)'0');
return (0x100 | ((int)*s - (int)'0'));
}
return 0;
}
Expand Down