Commit b62ed4c8 authored by Yi Kong's avatar Yi Kong
Browse files

recvfrom should set srcAddress for empty packets

recvfrom(2) may return 0 if:
 * packet received has zero length
 * the socket has performed orderly shutdown

Correctly handle the first case by checking that ss_family is
AF_INET{,6}.

Cherry-picked from commit 6dd21e69, but removed CTS tests for nyc-mr2.

Test: libcore.io.OsTest
Bug: 33483694
Change-Id: I5d58362c3b66534c14a301323f22f97f2d117421
parent 2536f92f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment