summaryrefslogtreecommitdiffstats
path: root/lib/src/packet.c
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2022-08-26 15:02:12 +0000
committerMauro Sardara <msardara@cisco.com>2022-09-01 13:20:29 +0000
commit940228d74920fbfd6707e1324711164360cca52d (patch)
tree1810371558a8f3efd5e9eb2e5ac042c98e354d50 /lib/src/packet.c
parent8d7d5327ca86871cdf1d2ce404ca88bb2a58630f (diff)
feat(hicn-plugin): interest manifest
Ref: HICN-748 Change-Id: Ie403de53a93094dca997cec379db6f5d3ce8e6be Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'lib/src/packet.c')
-rw-r--r--lib/src/packet.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/src/packet.c b/lib/src/packet.c
index ad86afb66..f020e099c 100644
--- a/lib/src/packet.c
+++ b/lib/src/packet.c
@@ -324,11 +324,12 @@ int
hicn_packet_get_payload (const hicn_packet_buffer_t *pkbuf, u8 **payload,
size_t *payload_size, bool hard_copy)
{
- size_t payload_len = hicn_packet_get_len (pkbuf) - pkbuf->payload;
+ *payload_size = hicn_packet_get_len (pkbuf) - pkbuf->payload;
if (hard_copy)
{
- memcpy (payload, pkbuf_get_header (pkbuf) + pkbuf->payload, payload_len);
+ memcpy (payload, pkbuf_get_header (pkbuf) + pkbuf->payload,
+ *payload_size);
}
else
{