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

nrfmin: fix type for NETOPT_PROTO #10822

Merged
merged 1 commit into from
Jan 18, 2019
Merged

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Jan 18, 2019

Contribution description

The type is documented as gnrc_nettype_t so it should by checked
as such.

Testing procedure

nrfmin should still send 6Lo frames without running into an assertion.

Issues/PRs references

Revealed in #10532 (comment) and thus required for #10532.

@miri64 miri64 added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: network Area: Networking Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jan 18, 2019
@cladmi
Copy link
Contributor

cladmi commented Jan 18, 2019

I tested this one alone and also tested it merged with #10532

USEMODULE=nrfmin CFLAGS='-DDEBUG_ASSERT_VERBOSE=1' BOARD=nrf52dk make -C examples/gnrc_networking flash

And I could ping6 two nrf52dk boards with each other for both cases.
So it fixes the issue from #10532 (comment)

Copy link
Contributor

@cladmi cladmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the change with @miri64 and the change makes it the same as

case NETOPT_PROTO:
assert(max_len == sizeof(gnrc_nettype_t));
*((gnrc_nettype_t *)value) = dev->proto;
res = sizeof(gnrc_nettype_t);

So looks good for this and it fixes the issue.

@miri64 miri64 merged commit 49a05ad into RIOT-OS:master Jan 18, 2019
@miri64 miri64 deleted the nrfmin/fix/proto-type branch January 18, 2019 17:51
@aabadie aabadie added this to the Release 2019.01 milestone Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants