hping3 ignores echo replies when --icmp-ipid option is used
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
hping3 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When the --icmp-ipid option is used to set the identifier field in the ICMP echo request, the corresponding echo reply packet is ignored. I have verified this behavior with tcpdump -- the packets do indeed arrive, but they are not recorded:
$ sudo hping3 -1 --icmp-ipid 256 8.8.8.8
HPING 8.8.8.8 (eth0 8.8.8.8): icmp mode set, 28 headers + 0 data bytes
^C
--- 8.8.8.8 hping statistic ---
4 packets transmitted, 0 packets received, 100% packet loss
round-trip min/avg/max = 0.0/0.0/0.0 ms
Patch to follow. With the patch:
$ sudo hping3 -1 --icmp-ipid 256 8.8.8.8
HPING 8.8.8.8 (eth0 8.8.8.8): icmp mode set, 28 headers + 0 data bytes
len=46 ip=8.8.8.8 ttl=59 id=30325 icmp_seq=0 rtt=6.4 ms
len=46 ip=8.8.8.8 ttl=59 id=30502 icmp_seq=1 rtt=3.0 ms
len=46 ip=8.8.8.8 ttl=59 id=30633 icmp_seq=2 rtt=2.9 ms
len=46 ip=8.8.8.8 ttl=59 id=31395 icmp_seq=3 rtt=2.7 ms
len=46 ip=8.8.8.8 ttl=59 id=31485 icmp_seq=4 rtt=2.6 ms
^C
--- 8.8.8.8 hping statistic ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 2.6/3.5/6.4 ms
ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: hping3 3.a2.ds2-7
ProcVersionSign
Uname: Linux 4.2.0-21-generic x86_64
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Dec 17 17:31:25 2015
InstallationDate: Installed on 2015-12-17 (1 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
SourcePackage: hping3
UpgradeStatus: No upgrade log present (probably fresh install)
The attachment "Patch to fix icmp.un.echo.id matching in recv_icmp()" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]