[riot-notifications] [RIOT-OS/RIOT] shell/ping6: Incorrect handling of unexpected pongs (#11519)

Marian Buschsieweke notifications at github.com
Mon May 13 17:34:24 CEST 2019


#### Description
`ping6` does check received pongs properly

#### Steps to reproduce the issue
- Set up two devices *A* and *B* that can exchange messages                      
- Modify device *B* to send multiple responses over some extended period of time (e.g. seconds)
- On *A*: `ping6` node *B*  more than once
- On *A*: `ping6` node *B* and immediately afterwards `ping6` some unreachable/unassigned IPv6 address

#### Expected results
- `ping6` ignores any pongs not matching a ping it send and filters out duplicates

#### Actual results
- `ping6` correctly filters out duplicates (it does print them marked as duplicates but ignores them for the statistics - which is very nice design choice)
- `ping6` treats every pong it receives as response (skipping duplicates):
    - The first of each duplicated pong matching a ping of the last invocation of `ping6` is counted as a response.
    - Duplicated pongs from a previous invocation of `ping6` are even reported even if the pinged address no longer matches
    - Because the unrelated pongs are counted as responses, `ping6` might end after receiving 3 pongs without having send 3 pings

E.g. see the stats here:
```
> 2019-05-13 17:32:42,837 - INFO #  ping6 fe80::1114:7221:1336:102a
2019-05-13 17:32:42,845 - INFO # 12 bytes from fe80::1114:7221:1336:102a: icmp_seq=1 ttl=64 rssi=-61 dBm time=32.115 ms
2019-05-13 17:32:42,852 - INFO # 12 bytes from fe80::1114:7221:1336:102a: icmp_seq=0 ttl=64 rssi=-67 dBm time=7.957 ms
2019-05-13 17:32:42,861 - INFO # 12 bytes from fe80::1114:7221:1336:102a: icmp_seq=0 ttl=64 rssi=-61 dBm time=15.542 ms (DUP!)
2019-05-13 17:32:42,869 - INFO # 12 bytes from fe80::1114:7221:1336:102a: icmp_seq=0 ttl=64 rssi=-62 dBm time=23.820 ms (DUP!)
2019-05-13 17:32:42,877 - INFO # 12 bytes from fe80::1114:7221:1336:102a: icmp_seq=0 ttl=64 rssi=-62 dBm time=32.099 ms (DUP!)
2019-05-13 17:32:43,854 - INFO # 12 bytes from fe80::1114:7221:1336:102a: icmp_seq=1 ttl=64 rssi=-77 dBm time=9.959 ms
2019-05-13 17:32:43,855 - INFO # 
2019-05-13 17:32:43,859 - INFO # --- fe80::1114:7221:1336:102a PING statistics ---
2019-05-13 17:32:43,866 - INFO # 2 packets transmitted, 3 packets received, 3 duplicates, 2147483598% packet loss
2019-05-13 17:32:43,870 - INFO # round-trip min/avg/max = 7.957/20.248/32.115 ms
```

#### Versions
(At least) current master


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/11519
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190513/3c040cd7/attachment.html>


More information about the notifications mailing list