Skip to content

Commit

Permalink
Bug #863: CI build failures make test fail
Browse files Browse the repository at this point in the history
Also fix intermittent test failure in TOS test. It seems there is a memory alignment issue.
  • Loading branch information
fklassen committed Jun 3, 2024
1 parent eaf2622 commit c7d7ff0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ jobs:
- name: List files in the repository
run: ls ${{ github.workspace }}
- name: tests
run: sudo make test || cat test/test.log
run: sudo make test || (cat test/test.log; false)
- run: echo "This test's status is ${{ job.status }}."
4 changes: 3 additions & 1 deletion src/tcpedit/tcpedit.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,10 @@ tcpedit_packet(tcpedit_t *tcpedit, struct pcap_pkthdr **pkthdr, u_char **pktdata
volatile uint16_t oldval = *((uint16_t *)ip_hdr);
volatile uint16_t newval;

ip_hdr->ip_tos = tcpedit->tos;
newval = *((uint16_t *)ip_hdr);
newval = htons((ntohs(newval) & 0xff00) | (tcpedit->tos & 0xff));
*((uint16_t *)ip_hdr) = newval;
static uint32_t cnt;
csum_replace2(&ip_hdr->ip_sum, oldval, newval);
}

Expand Down

0 comments on commit c7d7ff0

Please sign in to comment.