Commit Graph

1462 Commits

Author SHA1 Message Date
Benedict Wong
0cfc49485c Merge changes from topic "xfrmi-support" am: f928c1e4b9
am: 719761f60c

Change-Id: I13a826f5ae3c4cb700be789b369848685da1bc41
2018-11-25 19:26:26 -08:00
Benedict Wong
719761f60c Merge changes from topic "xfrmi-support"
am: f928c1e4b9

Change-Id: I9b76a58ab9ebdb9abb01216e8b3916f1f52f9267
2018-11-25 19:15:37 -08:00
Benedict Wong
c6fcedd779 Cleanup and update comments SA mark disabling comments
This commit cleans up and upates comments with regard to changes in
aosp/721999, clarifying the restrictions and potential pitfalls we would
see with regards to IPsec tunnel mode without updatable SAs.

Bug: 111854872
Test: Compiles, comment-only change
Change-Id: I07b0063987463c1a3cf42e112839a31739947c80
2018-11-21 22:50:52 -08:00
Benedict Wong
5d74984c24 Add XFRM-I support to IpSecService
This change adds support for XFRM-I to all IpSecService netd calls.
Fallback logic is in netd, and thus both VTI and XFRM-I parameters are
always passed down to IpSecService.

Bug: 78589502
Test: All java, CTS tests passing
Change-Id: Ie4186f0ad7e50763b21831f6fa411b5ee436de78
2018-11-21 08:34:54 -08:00
Benedict Wong
683441d87a Disable attempted updating of SA marks
SA marks are never updated during the UPDSA call. This change disables
the attempts to update the specified SAs, ensuring that the config
stored in IpSecService matches that of the allocated kernel resources.

Bug: 111854872
Test: Unit, CTS tests passing
Change-Id: Ic1fb862c8021ffa260c3e262ec698d8af0a826d9
2018-11-21 08:34:54 -08:00
Lorenzo Colitti
e6f051b6c6 [automerger skipped] Merge changes from topic "sort stats" into pi-dev
am: 664145dcbc  -s ours

Change-Id: Iaf2d41bf8c4464e05f8733d453fcc1a168ef8323
2018-11-16 05:41:50 -08:00
Junyu Lai
979209a2a3 Merge "Change types of fields of network stats reported to framework." am: 2c0a0092f1
am: 40de2a46a3

Change-Id: I0bf2bdc56f46928b94f0954e799d51196171fdc4
2018-11-13 01:53:45 -08:00
junyulai
5a43a6735e Change types of fields of network stats reported to framework.
Currently, NetworkStats use int to handle uid, set and tag,
while native side using unsigned int mixing with signed int
with that. This commit make necessary changes in JNI part while
libnetdbpf unifying the types of fields.

Bug: 112226716
Bug: 119193941
Test: 1. manually reconnect vpn
      2. update apps from playstore
      3. atest libnetdbpf_test
      4. runtest frameworks-net
      5. cts-tradefed run cts -m CtsUsageStatsTestCases -t \
              android.app.usage.cts.NetworkUsageStatsTest

Change-Id: I6c27124db8292e2825fba51b8994f013897cb566
Merged-In: I6c27124db8292e2825fba51b8994f013897cb566
(cherry picked from commit bf7803eed8283d5a1caa2efe90aa449590ddb94f)
2018-11-13 17:44:41 +08:00
Junyu Lai
40de2a46a3 Merge "Change types of fields of network stats reported to framework."
am: 2c0a0092f1

Change-Id: I82da681df48cd6425bbfb962d3969fa236e9db29
2018-11-13 01:37:17 -08:00
junyulai
6d49d8da7e Change types of fields of network stats reported to framework.
Currently, NetworkStats use int to handle uid, set and tag,
while native side using unsigned int mixing with signed int
with that. This commit make necessary changes in JNI part while
libnetdbpf unifying the types of fields.

Bug: 112226716
Test: 1. manually reconnect vpn
      2. update apps from playstore
      3. atest libnetdbpf_test
      4. runtest frameworks-net
      5. cts-tradefed run cts -m CtsUsageStatsTestCases -t \
              android.app.usage.cts.NetworkUsageStatsTest

Change-Id: I6c27124db8292e2825fba51b8994f013897cb566
2018-11-08 23:07:00 +08:00
junyulai
3da40c4828 Fix negative uid stats caused by 464xlat adjust when eBPF is on.
When using xt_qtaguid to count per uid stats,
NetworkStatsService needs to adjust the 464xlat traffic since
iptables module would double count for ipv4 and ipv6 packet.
But for eBPF, the per uid stats is collected in a different
hook, so the adjustment on root uid would only be needed in tx
direction.

Bug: 112226716
Test: 1. Make ipv4 traffic in ipv6-only network and check data
         usage.
      2. Make ipv4 traffic in a client which connect to
         ipv6-only hotspot.
      3. runtest frameworks-net
      4. cts-tradefed run cts -m CtsNetTestCases -t \
                 android.net.cts.TrafficStatsTest
      5. cts-tradefed run cts -m CtsUsageStatsTestCases

Change-Id: Ic9a84f5446eddc943c255d5f3b89dad171f53cac
Merged-In: Ic9a84f5446eddc943c255d5f3b89dad171f53cac
(cherry picked from commit c33ac0d43b594f6154accf03ae7e3fd34dedc79d)
2018-11-07 10:16:26 +08:00
Junyu Lai
fcb523e095 Merge "Fix negative uid stats caused by 464xlat adjust when eBPF is on." am: 0d63da86e2
am: a38302f84f

Change-Id: I3ee791e4b6fdd9d508807810183dc02c69bd2c0b
2018-10-30 19:46:18 -07:00
Junyu Lai
a38302f84f Merge "Fix negative uid stats caused by 464xlat adjust when eBPF is on."
am: 0d63da86e2

Change-Id: Ia5120619ce7d5cedd6e558ed4d1dc9a706638796
2018-10-30 19:35:32 -07:00
junyulai
7d412d0b46 Fix negative uid stats caused by 464xlat adjust when eBPF is on.
When using xt_qtaguid to count per uid stats,
NetworkStatsService needs to adjust the 464xlat traffic since
iptables module would double count for ipv4 and ipv6 packet.
But for eBPF, the per uid stats is collected in a different
hook, so the adjustment on root uid would only be needed in tx
direction.

Bug: 112226716
Test: 1. Make ipv4 traffic in ipv6-only network and check data
         usage.
      2. Make ipv4 traffic in a client which connect to
         ipv6-only hotspot.
      3. runtest frameworks-net
      4. cts-tradefed run cts -m CtsNetTestCases -t \
                 android.net.cts.TrafficStatsTest
      5. cts-tradefed run cts -m CtsUsageStatsTestCases

Change-Id: Ic9a84f5446eddc943c255d5f3b89dad171f53cac
2018-10-30 21:23:38 +08:00
Luke Huang
9a3586aa00 Merge "Refactor UidRange by using stable aidl structure" am: 55012f2249
am: 96c61c9fa2

Change-Id: I09ac7fc6525948b76114ef936dc1b3d2d1bae0fb
2018-10-28 17:55:57 -07:00
Luke Huang
96c61c9fa2 Merge "Refactor UidRange by using stable aidl structure"
am: 55012f2249

Change-Id: I9ac52f3869fe051d0ef7f45768f1defad155b53b
2018-10-28 17:44:20 -07:00
Treehugger Robot
55012f2249 Merge "Refactor UidRange by using stable aidl structure" 2018-10-29 00:17:34 +00:00
Android Build Merger (Role)
ace6d6fc61 Merge changes into pi-dev-plus-aosp 2018-10-26 02:59:16 +00:00
Bill Yi
f91213f1f5 [automerger skipped] Merge pie-platform-release to aosp-master - DO NOT MERGE am: 567b439367 -s ours
am: 13a634886b  -s ours

Change-Id: If860aa9619b4655886dfdac1528940e5e30446fe
2018-10-24 19:40:40 -07:00
Bill Yi
51a3f72bbb [automerger skipped] Merge pi-platform-release to stage-aosp-master - DO NOT MERGE
am: ef4374f6a2  -s ours

Change-Id: If3b4a8fabee7b9b74e345d59505040e45588f9e7
2018-10-24 17:20:17 -07:00
Bill Yi
13a634886b [automerger skipped] Merge pie-platform-release to aosp-master - DO NOT MERGE
am: 567b439367  -s ours

Change-Id: I2c4b9184789a1bdae2cec06e0e72f6c6ca049113
2018-10-24 17:17:46 -07:00
Bill Yi
567b439367 Merge pie-platform-release to aosp-master - DO NOT MERGE
Change-Id: I695db52f5e22509401258e8b083e7650d401d993
2018-10-24 14:48:44 -07:00
Bill Yi
ef4374f6a2 Merge pi-platform-release to stage-aosp-master - DO NOT MERGE
Change-Id: I13571b072111900d0979f026670e648cdef9899b
2018-10-24 09:08:38 -07:00
Luke Huang
e67f2178dc Refactor UidRange by using stable aidl structure
Use stable aidl generated structure instead of UidRange

Test: runtest frameworks-net passes
Test: manual testing of UidRange related function works
Change-Id: Iaf1c10777dc1e71df2be2a57533a10257b12626b
2018-10-24 19:45:09 +09:00
Chalard Jean
2d9ee8173a [automerger skipped] Merge "Delay global alerts by 1s for high thresholds" into pi-dev
am: 688358e870  -s ours

Change-Id: I61187439899450e20f4a1fb7490fff202b60be29
2018-10-19 02:58:01 -07:00
Chenbo Feng
e6278480b9 Merge "Move bpf project to system/bpf" am: 1006d271cc
am: d271be0e1c

Change-Id: I9c0592365844836dc644d6e090def32af3edf678
2018-10-18 08:12:41 -07:00
Chenbo Feng
d271be0e1c Merge "Move bpf project to system/bpf"
am: 1006d271cc

Change-Id: I0a96a2abd66fd0cca4b49d773a6990a59134128a
2018-10-17 13:55:43 -07:00
Chenbo Feng
4a259ab940 Move bpf project to system/bpf
The bpf project now have a new project directory in system/bpf instead
of inside netd. The network related bpf library is renamed to
libnetdbpf. Fix the dependency issue in framework to make sure no
regression.

Test: -m CtsNetTestCases -t android.net.cts.TrafficStatsTest
Bug: 112334572
Change-Id: Ibd477bf17d18d516aa520fb1569f4a395ef9abf0
2018-10-17 03:46:35 +00:00
Chalard Jean
0a8c58b06b Delay global alerts by 1s for high thresholds
This is a cherry-pick of aosp/735725 with a minor conflict.

By skipping updates if an alert is already scheduled, this avoids firing
the global alert too often on devices with high transfer speeds and high
quota.

Test: with tethering watching videos. Also runtest frameworks-net
Bug: 117243748
Change-Id: Ia0ed76141dfb33546529786eb0118138ef3708c2
Merged-In: Ie0ba5c1d1a2139606e63fcfe46ec77a89accd8d9
Merged-In: Iaabb31586e9e747871a526dc7ebb7deeb65d8f83
2018-10-16 08:57:17 +00:00
chen xu
80eac3b9a4 [automerger skipped] Merge changes into stage-aosp-master
am: f3f46416d0  -s ours

Change-Id: I14f88c998153e945516840acd7d3fbc765dd3357
2018-10-15 16:12:40 -07:00
chen xu
d69bec6213 [automerger skipped] Merge changes into stage-aosp-master
am: d3e9ff8a21  -s ours

Change-Id: I00a27b03ba4c0061bce8c21940abb517aecdc48f
2018-10-15 16:08:29 -07:00
Android Build Merger (Role)
f3f46416d0 Merge changes into stage-aosp-master 2018-10-15 22:44:53 +00:00
Android Build Merger (Role)
d3e9ff8a21 Merge changes into stage-aosp-master 2018-10-15 22:44:53 +00:00
Edward Savage-Jones
27c9db4485 Merge changes into stage-aosp-master
am: 11fcec3846

Change-Id: Ifada0acd374477fc5ecddd7bed8c4dc800cf5fb4
2018-10-15 08:17:49 -07:00
Beverly Tai
e987fb8e76 Merge changes into stage-aosp-master
am: 9c8b0b1983

Change-Id: I821951d01aed73f23ace36870362eb0ef875532f
2018-10-15 08:13:53 -07:00
Android Build Merger (Role)
11fcec3846 Merge changes into stage-aosp-master 2018-10-15 15:00:04 +00:00
Android Build Merger (Role)
9c8b0b1983 Merge changes into stage-aosp-master 2018-10-15 15:00:04 +00:00
Andreas Gampe
40f0c9f3e4 Merge changes into stage-aosp-master
am: cd6403a396

Change-Id: Iee2f5645cbe6122eececc1f0517175daa5b414ed
2018-10-11 09:18:51 -07:00
Andreas Gampe
b034526cc5 Merge changes into stage-aosp-master
am: 6c73f19679

Change-Id: Ic989692175b2763d58d3cbc169919ee24d2ba2d0
2018-10-11 09:13:43 -07:00
Android Build Merger (Role)
cd6403a396 Merge changes into stage-aosp-master 2018-10-11 15:45:44 +00:00
Android Build Merger (Role)
6c73f19679 Merge changes into stage-aosp-master 2018-10-11 15:45:44 +00:00
Yan Yan
b950e8b81c Merge changes I10c01f2b,Ie05bc535 am: 8e3ad8b525
am: 7947437af7

Change-Id: I5501ba7eb04493b5de84feaeadb53b57de89e8d2
2018-10-05 12:13:20 -07:00
Igor Murashkin
e577b00935 Merge changes into stage-aosp-master
am: 3a955b82c1

Change-Id: I2aac3fb3b6fa638e9c0cc871a02216ed498df98d
2018-10-05 11:57:18 -07:00
Igor Murashkin
b5310fb1a0 Merge changes into stage-aosp-master
am: 751838ee1d

Change-Id: I63acb13055109fc08fbe77d4dd6ebd68daeaabcd
2018-10-05 11:50:43 -07:00
Yan Yan
7947437af7 Merge changes I10c01f2b,Ie05bc535
am: 8e3ad8b525

Change-Id: I2e55a266f65268ca734c028d4da7add14a281d75
2018-10-05 11:47:12 -07:00
Yan Yan
8e3ad8b525 Merge changes I10c01f2b,Ie05bc535
* changes:
  Check to ensure UDP-encap is used only for IPv4
  Add UDP encapsulation tests for IpSecService.
2018-10-05 17:38:41 +00:00
Android Build Merger (Role)
3a955b82c1 Merge changes into stage-aosp-master 2018-10-05 17:35:26 +00:00
Android Build Merger (Role)
751838ee1d Merge changes into stage-aosp-master 2018-10-05 17:35:26 +00:00
evitayan
43d93a0c78 Check to ensure UDP-encap is used only for IPv4
This commit checks if UDP-encapsulation is used
for unsupported address family and throws
IllegalArgumentException when it happens.

Bug: 74213459
Test: Tests added in testCreateTransportModeTransformWithEncap
      and testCreateTunnelModeTransformWithEncap.
      Command: runtest frameworks-net
      Verified on taimen.
Change-Id: I10c01f2bad6aca23430849ea9ef6c1eb157ae131
2018-10-04 11:44:00 -07:00
Chalard Jean
b06e8f4f34 Merge "Delay global alerts by 1s for high thresholds" am: a31118e420
am: dc6e65b3f0

Change-Id: Iaabb31586e9e747871a526dc7ebb7deeb65d8f83
2018-10-04 01:57:53 -07:00