platform_system_core/libnetutils
Maciej Żenczykowski 0129aaae86 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
2020-05-08 22:34:37 -07:00
..
include/netutils add nodad argument to ifc_act_on_address() and add it to header file 2020-01-26 06:35:30 -08:00
Android.bp Move checksum code from clatd to libnetutils. 2019-01-30 12:33:29 +09:00
checksum.c Move checksum code from clatd to libnetutils. 2019-01-30 12:33:29 +09:00
dhcpclient.c liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
dhcpmsg.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
dhcpmsg.h auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
dhcptool.c libnetutils: Rename dhcptool to dhcpdbg 2017-05-17 10:47:28 -07:00
ifc_utils.c add nodad argument to ifc_act_on_address() and add it to header file 2020-01-26 06:35:30 -08:00
NOTICE Automated import from //branches/master/...@140824,140824 2009-03-24 18:36:50 -07:00
OWNERS Refactor OWNERS files for Android Core Networking 2019-02-12 13:25:13 +08:00
packet.c libnetutils/packet.c - fix a raw socket reception race 2020-05-08 22:34:37 -07:00
packet.h libnetutils/packet.c - fix a socket leak on bind error 2020-05-08 22:34:37 -07:00