Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No payload no marker #1645

Merged
merged 2 commits into from Apr 24, 2017
Merged

No payload no marker #1645

merged 2 commits into from Apr 24, 2017

Conversation

bukepo
Copy link
Member

@bukepo bukepo commented Apr 23, 2017

cli CoAP client always sets the payload marker, which may cause some CoAP server failed to parse the packet.
Also the current CoAP parser doesn't verify the payload marker. This PR,

  • Set payload marker when required in cli CoAP client.
  • Raise parse error when payload marker present but without payload.

@bukepo bukepo requested a review from jwhui April 23, 2017 15:02
@codecov-io
Copy link

codecov-io commented Apr 23, 2017

Codecov Report

Merging #1645 into master will increase coverage by 0.05%.
The diff coverage is 22.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1645      +/-   ##
==========================================
+ Coverage   66.93%   66.99%   +0.05%     
==========================================
  Files         166      166              
  Lines       21102    21107       +5     
  Branches     2588     2590       +2     
==========================================
+ Hits        14124    14140      +16     
- Misses       6062     6065       +3     
+ Partials      916      902      -14
Impacted Files Coverage Δ
src/cli/cli_coap.cpp 0% <0%> (ø) ⬆️
src/core/coap/coap_header.cpp 61.35% <100%> (+0.37%) ⬆️
src/core/net/udp6.cpp 82.85% <0%> (-1.91%) ⬇️
src/core/thread/topology.hpp 89.02% <0%> (-1.22%) ⬇️
src/ncp/ncp_base.cpp 28.8% <0%> (-0.78%) ⬇️
src/core/thread/mle_router.cpp 77.52% <0%> (-0.54%) ⬇️
src/core/net/ip6.cpp 54% <0%> (-0.24%) ⬇️
src/core/thread/mle.cpp 81.7% <0%> (+0.14%) ⬆️
examples/platforms/posix/radio.c 78.42% <0%> (+0.41%) ⬆️
src/core/thread/lowpan.cpp 93.9% <0%> (+1.43%) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 030efba...3b62964. Read the comment docs.

@jwhui jwhui added this to the 0.01.00 (Initial Official Release) milestone Apr 24, 2017
@jwhui jwhui merged commit 739006b into openthread:master Apr 24, 2017
vaas-krish pushed a commit to vaas-krish/openthread that referenced this pull request May 23, 2017
…s/github_2017_04_25 to master

* commit 'f25c6727badcddbe7d1d8263478ecb4ec6c40fec': (35 commits)
  Add `ExitNow()` in MARBLE-387 workaround path.
  Reduce MTD code size by removing some unused MeshCoP features (openthread#1361)
  Add/Update logs in `MeshForwarder` class (openthread#1649)
  Remove use of gnu-extension anonymous struct/union definitions. (openthread#1651)
  Require platform TRNG to provide requested output length or error. (openthread#1650)
  Ensure fairness in handling of data polls from sleepy children (openthread#1646)
  Update formatting in `NcpSpi` and `spi-slave.h` files (openthread#1648)
  Add EFR32 to readme. (openthread#1647)
  Add support for SiLabs EFR32. (openthread#1592)
  No payload no marker (openthread#1645)
  return the right error information for some cli commands (openthread#1644)
  Allow to clear Operation Dataset when a new network parameter is set. (openthread#1639)
  `NcpBuffer`: Fixing bug with handling of longer frame segments (openthread#1643)
  Fix inherits implicit virtual warning. (openthread#1641)
  Fix README.md command list of Diag module. (openthread#1640)
  Fix the error check for src/dst address get in `Frame::ToInfoString()` (openthread#1633)
  Set Commissioner Data when becoming Leader (openthread#1636)
  enable all features on posix (openthread#1634)
  Add `src/core` header files to PRETTY_FILES. (openthread#1632)
  Remove unnecessary configure options from pretty check. (openthread#1631)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants