Skip to content
Permalink
Browse files

net: pkt: Move everything up when pulling data

The net_pkt_pull() needs to move all the remaining data in the
net_buf instead of just the pull amount.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
  • Loading branch information...
jukkar committed Jul 12, 2019
1 parent 285bfa7 commit 0ec43412779ac3ee413458aa138d41acc408b01c
Showing with 1 addition and 1 deletion.
  1. +1 −1 subsys/net/ip/net_pkt.c
@@ -1774,7 +1774,7 @@ int net_pkt_pull(struct net_pkt *pkt, size_t length)
c_op->buf->len -= rem;
left -= rem;
if (left) {
memmove(c_op->pos, c_op->pos+rem, rem);
memmove(c_op->pos, c_op->pos+rem, left);
}

/* For now, empty buffer are not freed, and there is no

0 comments on commit 0ec4341

Please sign in to comment.
You can’t perform that action at this time.