-
Notifications
You must be signed in to change notification settings - Fork 2k
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
shell_commands: check ICMPv6 echo reply sender #11933
Conversation
Fixes RIOT-OS#11519 by checking the source address when an echo reply is received by the `ping6` command.
Ping @maribu |
I do not have the nRF52840DK board at hand. I'll test as soon as possible. |
Huh? Did I miss something? Why is an nRF52840DK required for that? o.O |
@@ -338,7 +338,8 @@ static void _print_reply(_ping_data_t *data, gnrc_pktsnip_t *icmpv6, | |||
uint16_t recv_seq; | |||
|
|||
/* not our ping */ | |||
if (byteorder_ntohs(icmpv6_hdr->id) != data->id) { | |||
if ((byteorder_ntohs(icmpv6_hdr->id) != data->id) && | |||
!ipv6_addr_equal(from, &data->host)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would make sense to print a short line to indicate that potential mischief happened? E.g. the potential driver issue with either at85rf2xx or the nrf52 802.15.4 I noticed would no longer be detectable if the unexpected pongs are silently dropped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mh... The original IP implementation does not seem to care about this + it could be legitimate (e.g. when two threads pinging at the same time for some reason) that a packet that holds this condition arrives here. What is the potential driver issue again?
Tested on
This is the brute change I made in the receiver:
I seem to be getting the same result as in #11519..
It also somehow seem to be getting confused when pinging to an unreachable address
|
|
So if I understand right When testing this PR rebased on top of #11938 the bug was no longer present.
|
Nope, everything right :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reworded "Fixes" to "Fix for". This way it is ignored by GitHub ;-). |
GO! |
What about broadcast pings? |
Contribution description
Fix for #11519 by checking the source address when an echo reply is
received by the
ping6
command.Testing procedure
See #11519 for testing procedures
Issues/PRs references
Fix for #11519.