1
0
Fork 0
forked from nuttx/nuttx-update

Merged in antmerlino/nuttx/sixlowpan-input-fix (pull request #812)

net/sixlowpan: sixlowpan_input should always return 0 if the incoming frame was consumed.

Approved-by: GregoryN <gnutt@nuttx.org>
This commit is contained in:
Anthony Merlino 2019-01-13 14:26:00 +00:00 committed by GregoryN
parent 7ed340c9a1
commit f4ae71be70

View file

@ -836,7 +836,6 @@ int sixlowpan_input(FAR struct radio_driver_s *radio,
{
nwarn("WARNING: Unsupported protoype: %u\n",
ipv6hdr->proto);
ret = -EPROTO;
goto drop;
}
}
@ -845,7 +844,6 @@ int sixlowpan_input(FAR struct radio_driver_s *radio,
{
nwarn("WARNING: Packet too small: Have %u need >%u\n",
radio->r_dev.d_len, hdrlen);
ret = -ENOBUFS;
goto drop;
}
@ -858,6 +856,10 @@ int sixlowpan_input(FAR struct radio_driver_s *radio,
&destmac);
drop:
radio->r_dev.d_len = 0;
/* We consumed the frame, so we must return 0. */
ret = 0;
}
}
}