diff options
author | Jere Leppänen <jere.leppanen@nokia.com> | 2023-02-13 17:29:32 +0200 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2023-02-20 09:42:15 +0200 |
commit | 94e7d2686953aaaaccdb47e0e83628da41a8e663 (patch) | |
tree | a404ed4b9b2be12fb8a85ead48335447290abc54 /helper | |
parent | 29fada6dc2d73813dd05b2d5da940088875f2967 (diff) |
helper: test: chksum: fix IPv4 header initialization
Initialize also tos, frag_offset and ttl. Uninitialized values can
cause the test to fail.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'helper')
-rw-r--r-- | helper/test/chksum.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/helper/test/chksum.c b/helper/test/chksum.c index d14ee20d1..3b1f8ed9f 100644 --- a/helper/test/chksum.c +++ b/helper/test/chksum.c @@ -107,6 +107,9 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED) ODPH_IPV4HDR_LEN); ip->proto = ODPH_IPPROTO_UDP; ip->id = odp_cpu_to_be_16(1); + ip->tos = 0; + ip->frag_offset = 0; + ip->ttl = 0; odp_packet_has_ipv4_set(test_packet, 1); if (odph_ipv4_csum_update(test_packet) < 0) status = -1; |