File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838
3939 - name : Run standalone forwarding test
4040 run : |
41- ./build/test-wolfssl-forwarding
41+ sudo ./build/test-wolfssl-forwarding
4242
4343 - name : Run standalone TTL expired test
4444 run : |
Original file line number Diff line number Diff line change @@ -837,9 +837,13 @@ START_TEST(test_wolfip_forwarding_basic)
837837 ck_assert_mem_eq (fwd -> eth .dst , next_hop_mac , 6 );
838838 ck_assert_mem_eq (fwd -> eth .src , s .ll_dev [TEST_SECOND_IF ].mac , 6 );
839839 ck_assert_uint_eq (fwd -> ttl , (uint8_t )(initial_ttl - 1 ));
840- expected_csum = (uint16_t )(orig_csum + 1 );
841- if (expected_csum == 0 )
842- expected_csum = 0xFFFF ;
840+ {
841+ uint32_t sum = orig_csum + 0x0100 ;
842+ sum = (sum & 0xFFFF ) + (sum >> 16 );
843+ expected_csum = (uint16_t )sum ;
844+ if (expected_csum == 0 )
845+ expected_csum = 0xFFFF ;
846+ }
843847 ck_assert_uint_eq (ee16 (fwd -> csum ), expected_csum );
844848}
845849END_TEST
You can’t perform that action at this time.
0 commit comments