Commit 8db13f90 authored by Jukka Rissanen's avatar Jukka Rissanen
Browse files

net: ipv6: Free received NA net_buf

If we receive a neighbor advertisement, we need to free its
net_buf because we are returning NET_OK to the caller. This
return code means that we consumed the net_buf but we did
not call net_nbuf_unref() in this case.

Change-Id: Ia6d8f1b440be87eff5d2b14a23336a37be6d6a04
Signed-off-by: default avatarJukka Rissanen <jukka.rissanen@linux.intel.com>
parent f25d4768
Loading
Loading
Loading
Loading
+2 −0
Changes for subsys/net/ip/ipv6.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1453,6 +1453,8 @@ static enum net_verdict handle_na_input(struct net_buf *buf)
		goto drop;
	}

	net_nbuf_unref(buf);

	net_stats_update_ipv6_nd_sent();

	return NET_OK;