Skip to content

Conversation

benpicco
Copy link
Contributor

Contribution description

There are instances where gnrc_netif_highlander() is used to check if there is only one interface.
The gnrc_netif_highlander() however only returns true if there can only be one interface.
It will return false if there is only one interface, but more could be configured.

Testing procedure

see #12994 (comment)

Issues/PRs references

alternative to #13736

@benpicco benpicco added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: network Area: Networking labels Mar 27, 2020
@benpicco benpicco requested a review from jia200x March 27, 2020 12:50
@benpicco
Copy link
Contributor Author

Following #13736 (comment) I dropped all but the shell/gnrc_icmpv6_echo fix.

@benpicco benpicco changed the title fix incorrect use of gnrc_netif_highlander() shell/gnrc_icmpv6_echo: fix incorrect use of gnrc_netif_highlander() Mar 27, 2020
Copy link
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

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

See discussion above

Copy link
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

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

With my suggested fix it works as expected. Please address and squash so we can get this merged ASAP.

@miri64
Copy link
Member

miri64 commented Mar 27, 2020

Please also fix commit message and PR title for something more in line with the current change.

@benpicco benpicco force-pushed the highlander-fix branch 2 times, most recently from ed2f370 to 158ca59 Compare March 27, 2020 13:36
@benpicco
Copy link
Contributor Author

Please also fix commit message and PR title for something more in line with the current change.

shell/gnrc_icmpv6_echo: fix replace incorrect use of gnrc_netif_highlander()?

We want to check if there *is* only one interface, not if there *can*
be no more than one interface here.
Copy link
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

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

Re-ACK. Tested the current state with and without GNRC_NETIF_SINGLE defined. Please squash.

@miri64 miri64 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 27, 2020
@miri64 miri64 merged commit 155dd30 into RIOT-OS:master Mar 27, 2020
@benpicco benpicco deleted the highlander-fix branch March 27, 2020 14:54
@leandrolanzieri leandrolanzieri added the Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer label Apr 3, 2020
@leandrolanzieri leandrolanzieri added this to the Release 2020.04 milestone Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer 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