You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ICMP packet headers are parsed wrongly. Since SOCK_RAW is used, the result of recvfrom also includes IP headers. Therefore, ICMP headers begin after IP headers end – in your case, they start not at &pckt, but at &pckt + ip_headers_length point. You need to use iphdr struct, to parse them properly.
ICMP packet headers are parsed wrongly. Since
SOCK_RAW
is used, the result ofrecvfrom
also includes IP headers. Therefore, ICMP headers begin after IP headers end – in your case, they start not at&pckt
, but at&pckt + ip_headers_length
point. You need to use iphdr struct, to parse them properly.This line is entirely wrong:
ping/ping.cpp
Line 235 in 05dbc75
type
andcode
would be a part of IP headers and the number69
has nothing to do with the ICMP protocol.The text was updated successfully, but these errors were encountered: