OSDN Git Service

Pass around struct android_net_context for better behaviour
authorErik Kline <ek@google.com>
Thu, 25 Jun 2015 05:27:34 +0000 (14:27 +0900)
committerErik Kline <ek@google.com>
Mon, 29 Jun 2015 09:39:54 +0000 (18:39 +0900)
commit01e37c9665018534c798daaa59d5b0adb408e0a4
tree705760bb565f74a94754ff93f3f2c82d11dda54c
parenteeb9f5e41662828989f3913d81ec23229a668434
Pass around struct android_net_context for better behaviour

Group network context elements in to a single struct and
add a version of android_getaddrinfofornet() that accepts it.

The introduction of UID-based routing means that the UID is an
integral part of the network context when evaluating connectivity,
sorting addresses, etc.

Also, introduce a distinction between DNS netids/marks and those
expected to be used by the application.  This can be important
when the network an application is using is not the same as the
network on which DNS queries will be issued.

Additionally, de-duplicate the UDP connect logic (collapse both
_test_connect() and _find_src_addr() into just the latter).

Bug: 19470192
Bug: 20733156
Bug: 21832279
Change-Id: If16c2f4744695f507993afdac078ca105eb5d3e4
libc/dns/include/resolv_netid.h
libc/dns/net/getaddrinfo.c
libc/libc.map