commit | c3227bbcd9777e34884ea77840263044d7e11a91 | [log] [tgz] |
---|---|---|
author | Samuel Tan <samueltan@google.com> | Fri Aug 28 16:40:07 2015 -0700 |
committer | chrome-bot <chrome-bot@chromium.org> | Wed Sep 02 07:01:28 2015 -0700 |
tree | 232b17e3a93e267755efdb36eb1a8bb8d296e097 | |
parent | 8ff81329524eb3af0d8e7b2642a4a4c262d6b4fd [diff] |
shill: parse IP header in IcmpSession Previously we assumed that the InputData handed to IcmpSession::OnEchoReplyReceived was a raw struct icmphdr, when it is in fact wrapped in an IP header. This patch adds code to parse out the IP header in this function to retrieve the actual struct icmphdr contained in the IP payload. While there: add missing whitespace to a log message in ConnectionDiagnostics. BUG=chromium:526319 TEST=Compile shill and run unit tests. TEST=Manually invoked ConnectionDiagnostics by editing shill source code, and verified that pinging DNS servers and the target web server using IcmpSession objects works as expected. Change-Id: Iae15526d30a12028fa7754fefcc7f007b2fdb284 Reviewed-on: https://chromium-review.googlesource.com/296511 Commit-Ready: Samuel Tan <samueltan@chromium.org> Tested-by: Samuel Tan <samueltan@chromium.org> Reviewed-by: mukesh agrawal <quiche@chromium.org>