diff options
Diffstat (limited to 'example/ipfragreass/odp_ipfragreass_reassemble.c')
-rw-r--r-- | example/ipfragreass/odp_ipfragreass_reassemble.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/example/ipfragreass/odp_ipfragreass_reassemble.c b/example/ipfragreass/odp_ipfragreass_reassemble.c index 35742d3a5..fba900f7a 100644 --- a/example/ipfragreass/odp_ipfragreass_reassemble.c +++ b/example/ipfragreass/odp_ipfragreass_reassemble.c @@ -303,11 +303,17 @@ static int send_packet(struct packet *tail, odp_queue_t out) */ while (current && equal_flow(current, &result)) { struct packet new_result = *current; - int concat_success; + int concat_success, trunc_success; current = prev_packet(new_result); header = odp_packet_data(result.handle); - odp_packet_pull_head(result.handle, ipv4hdr_ihl(*header)); + trunc_success = odp_packet_trunc_head(&result.handle, ipv4hdr_ihl(*header), + NULL, NULL); + if (trunc_success < 0) { + fprintf(stderr, "ERROR: odp_packet_trunc_head\n"); + return -1; + } + concat_success = odp_packet_concat(&new_result.handle, result.handle); if (concat_success < 0) { |