diff options
author | Maciej Żenczykowski <maze@google.com> | 2020-05-06 14:09:45 -0700 |
---|---|---|
committer | Maciej Żenczykowski <maze@google.com> | 2020-05-08 22:34:37 -0700 |
commit | 0129aaae86be64d293eb64e25c6acb1a57cbd588 (patch) | |
tree | f6f5ee4d49621998013bd70440dabbfe4309ba16 /trusty/coverage/coverage_test.cpp | |
parent | b7f370c0143567f9f475c12ddadb5910b9eb74b7 (diff) |
libnetutils/packet.c - fix a raw socket reception race
A socket created bound to a specific protocol can receive packets before
it's bound to a specific interface/mac.
It's best to rely on the bind().
This replicates the way packet sockets are created in external/android-clat.
See: ring.c ring_create() and clatd.c configure_packet_socket()
Test: builds, atest
Bug: 155297277
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I569d2b81a396f352ab5d1b71bd5ad0d96217aab1
Diffstat (limited to 'trusty/coverage/coverage_test.cpp')
0 files changed, 0 insertions, 0 deletions