Commit 7618e810 authored by Lorenzo Colitti's avatar Lorenzo Colitti
Browse files

Rely on the kernel to check the ident for us.

The code path that uses the ping socket still keeps track of the
ident value in the packet. This is unnecessary because the ident
value is overwritten by the kernel when sending packets and is
checked by the kernel when receiving packets.

Instead just rely on the fact that the kernel checks the ident
value on received packets filters out non-matching replies.  This
allows us to remove the code that calls bind() and getsockname()
just to get the ident value from the socket.

Bug: 9469682
Change-Id: I5041316c6e5262a4de2b547c40bd77cfac29a5b9
parent ce2d2d04
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment