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:
parent
7ed340c9a1
commit
f4ae71be70
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue