This is the default for BPFLOADER_MIN_VER if not otherwise specified.
This does not affect mainline code, see:
cs/p:aosp-master file:packages/modules/Connectivity/bpf_progs define.*BPFLOADER_MIN_VER
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ice5b14c3b580653f8889a5292abaa89cf8434da1
This is also needed in other classes in subsequent CLs, move to
a common place to prevent from code duplication.
Test: TH
Bug: 275532605
Change-Id: Id460cd231bbc520ebdcfe988a7507c6959500ac4
This CL also adds SOCK_DESTROY constants.
These changes will be used by upcoming CLs that implement socket destroy
in ConnectivityService.
Bug: 270298713
Test: atest NetworkStaticLibTests
Change-Id: Ief507b3f8cc4fe23c08699e7fc8f3f62e5acfcdc
Before this CL, StructInetDiagSockId.parse convert v4-mapped v6 address
to Inet4Address that is inconsistent with the value in
inet_diag_msg.idiag_family.
Also, due to this behavior, input of parse and output of pack could be
different.
This is the issue specifically when SOCK_DESTROY request is populated
based on the InetDiagMessage from the kernel.
Bug: 270298713
Test: atest NetworkStaticLibTests
Change-Id: I45256bb1069cfc4e01662b3a533077933f3f019a
mdns may be imported in other non-AOSP projects as a library, along with
its dependencies from net-utils-device-common. While all of
net-utils-device-common may not build against system API, this requires
the files used by mdns to build against system API.
Add a library to allow checking that the dependencies can still build
against system API.
Test: m
Bug: 272392042
Change-Id: I468f53b47ef55c23137594a79599b148084f4535
Since it just came up again, and I just verified this still works
Test: N/A
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I292c94cf9af63488ed30a6ac367ac83c8912e97e
Currently, the test http server will respond whenever
http request is read, no matter how much data was declared
in the Content-Length header. For tests that uses POST
request to test uplink traffic this is not good enough.
Invoke parseBody to read data from input stream to make
sure the http body is read.
Test: atest android.net.NetworkStatsIntegrationTest \
--rerun-until-failure 100
Bug: 139774492
Change-Id: I1b71f3e55747d104e4a8796611517d93f178321f
For testing purposes, a TestNetworkInterface provides a
FileDescriptor which allows content injection on the test
network. However, this could be hard to use because the
callers need to compose IP packets in order to inject
content to the test network.
In order to remove the need of composing the IP packets,
this class forwards IP packets between two
TestNetworkInterface instances. Thus, the TCP/IP headers
could be parsed/composed automatically by the protocol stack of
this additional TestNetworkInterface, while the payload is
supplied by the servers run on the interface.
Test: 1. atest android.net.NetworkStatsIntegrationTest
2. atest com.android.cts.net.HostsideVpnTests
Bug: 139774492
Change-Id: I8fe5a434d6d727a81d106a967dcdca157424e12e
StructInetDiagMsg#parse used absolute position to parse id and idiag_uid
fields.
This causes an issue when byte buffer contains multiple netlink messages
and parsed netlink message starts from the middle of byte buffer.
This CL fixes above issue and adds test for the case that single byte
buffer contains multiple netlink messages.
Test: atest NetworkStaticLibTests
Change-Id: I771daf17b4a606915d5edefd9f0e90ef01abf168
NLM_F_REPLACE is helpful when we only want to update the preferred and
valid lifetime for a specific IPv6 address. DHCPv6 prefix delegation
gives a concrete example, once client refreshes the delegated prefix
successfully in RENEW or REBIND state, it also needs to extend the
preferred and valid lifetime of an IPv6 address, otherwise, it becomes
depreacated when the lifetime expires. Add the NLM_F_REPLACE flag to
replace the existing matching address object with updated fields.
Bug: 260934173
Test: atest NetworkStaticLibsTests
Change-Id: Ic001ddf9cfb031a586bbe177819e7666eaf7cde0
This is also needed by integration test in NetworkStack module
in follow-up CLs. Move to a common place first.
This is a no-op refactoring.
Test: atest com.android.cts.net.HostsideVpnTests
Bug: 139774492
Change-Id: Ifc7ed4c93edfb0f6f8eb47231f6df40332d2c10c
main change is checksum of zero buffer is now 0 instead of
the equivalent, but technically incorrect 0xFFFF.
Test: TreeHugger
Bug: 265591307
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1a8b0ace704009f82d3b7ad1c299bf8a6d8964d8
Adds constructors for RtNetlinkAddressMessage and StructIfaddrMsg to
make it possible to directly construct RtNetlinkAddressMessage in the
test cases.
Bug: 267980538
Test: m
Change-Id: I21bf0cbef888495dc9a165a0fe6d5b39135e4c18