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
Loading
Please sign in to comment