Commit Graph

556 Commits

Author SHA1 Message Date
Ahmed ElArabawy
caffbe1277 Add APF black list for ether-type
Add a configurable black for protocols which packets are to be dropped
by APF. This enales an OEM to configure the APF to filter out un-needed
packets from reaching the host

Bug: 62415182
Test: runtest frameworks-net

Change-Id: I86335a0f854d5e83a2b2767978cd69b2cc25c2f8
Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
2017-08-15 14:55:50 -07:00
Lorenzo Colitti
8c0d16cfa6 Merge changes I82d3bee0,I9c9413d7 am: deb4eb5d05 am: 51c3d6a8bf am: 0cf31d4d6d am: 20fa45e3a9
am: d14c177136

Change-Id: I100ba259bcebf0ed0b9192ed32a038457d2a2283
2017-08-15 02:52:22 +00:00
Lorenzo Colitti
d14c177136 Merge changes I82d3bee0,I9c9413d7 am: deb4eb5d05 am: 51c3d6a8bf am: 0cf31d4d6d
am: 20fa45e3a9

Change-Id: I5d700c9818a89ba3eaab8a34bb799ae7145dbd28
2017-08-15 02:34:30 +00:00
Lorenzo Colitti
20fa45e3a9 Merge changes I82d3bee0,I9c9413d7 am: deb4eb5d05 am: 51c3d6a8bf
am: 0cf31d4d6d

Change-Id: I759ed9a79b6ebfa2ae6143167c0dd7d0ad84c67f
2017-08-15 02:25:36 +00:00
Lorenzo Colitti
0cf31d4d6d Merge changes I82d3bee0,I9c9413d7 am: deb4eb5d05
am: 51c3d6a8bf

Change-Id: Ie7e8806faecdad96b4033404709fb3aebc4bdd0f
2017-08-15 02:16:18 +00:00
Lorenzo Colitti
51c3d6a8bf Merge changes I82d3bee0,I9c9413d7
am: deb4eb5d05

Change-Id: Iaa6aecf3ec3a91dc04f4533c0ea5b649bdfeb83d
2017-08-15 02:07:36 +00:00
Lorenzo Colitti
deb4eb5d05 Merge changes I82d3bee0,I9c9413d7
* changes:
  Pass data usage limits to tethering offload code.
  Don't time out when fetching tether offload stats.
2017-08-15 01:57:28 +00:00
Lorenzo Colitti
50b60fc34d Pass data usage limits to tethering offload code.
Bug: 29337859
Bug: 32163131
Test: builds
Test: OffloadControllerTest passes
Change-Id: I82d3bee030bafa8fe85855885b5fc3893e699181
2017-08-15 00:09:23 +09:00
Hugo Benichi
b2cdd9ee30 Merge "NetworkCapabilities: fix describeImmutableDifferences" am: 7575ec2240 am: f6346af47e am: 8dfb91df6c am: 722c71ed8b
am: edea5c8266

Change-Id: Ie5df14e0ea1c12e0cfabe87978ac6c9b744353b2
2017-08-05 01:40:48 +00:00
Hugo Benichi
edea5c8266 Merge "NetworkCapabilities: fix describeImmutableDifferences" am: 7575ec2240 am: f6346af47e am: 8dfb91df6c
am: 722c71ed8b

Change-Id: I12636c6699ff60487a28570208e819ea0b66fa2e
2017-08-05 01:28:01 +00:00
Hugo Benichi
722c71ed8b Merge "NetworkCapabilities: fix describeImmutableDifferences" am: 7575ec2240 am: f6346af47e
am: 8dfb91df6c

Change-Id: I533ef8fe369cec19d283ff2950314fce6e28cffd
2017-08-05 01:14:30 +00:00
Hugo Benichi
8dfb91df6c Merge "NetworkCapabilities: fix describeImmutableDifferences" am: 7575ec2240
am: f6346af47e

Change-Id: Ieccad46fcffcaf748f5644b04617e9a82527000e
2017-08-05 01:01:04 +00:00
Hugo Benichi
f6346af47e Merge "NetworkCapabilities: fix describeImmutableDifferences"
am: 7575ec2240

Change-Id: If38efacdeec8476880835657938e435f9b598525
2017-08-05 00:54:43 +00:00
Hugo Benichi
2ecb9408f4 NetworkCapabilities: fix describeImmutableDifferences
This patch fixes the mask used in describeImmutableDifferences which did
not correctly turn NET_CAPABILITY_NOT_METERED into bit flag.

Bug: 63326103
Test: added unit tests, runtest frameworks-net
Change-Id: Ib6b390b1daef5912859302692af7dcd6cfd3e39a
2017-08-04 15:17:40 +09:00
Alexandru-Andrei Rotaru
5469504e6b Notify the user and turn off tethering when the service is disallowed.
Added UserRestrinctionListener for turning the service off one the
DISALLOW_CONFIG_TETHERING is on into Tethering.  Added notification
about
tethering being turned off. Also added Unit Tests to test the
functionality
of the UserRestrictionListener added.

Bug: 27936525
Test: Turn the tehering service on (either wifi, usb or bluetooth).
Automatically the system should send a notification about the service
being active.Close settings from recents. From TestDPC User Restrictions
switch on DISALLOW_CONFIG_TETHERING. The tethering should be turned off
and a notification should appear informing that the service is inactive.

Merged-In: Ib7ea8885cedc2a842ebd4487c8b366a6666996bc
Change-Id: Ib7ea8885cedc2a842ebd4487c8b366a6666996bc
(cherry picked from commit fa6d5c5ca0)
2017-08-03 13:51:36 +00:00
Treehugger Robot
5027dd1026 Merge "Notify the user and turn off tethering when the service is disallowed." 2017-08-03 10:29:55 +00:00
TreeHugger Robot
be09d8d39b Merge "Notify the user and turn off tethering when the service is disallowed." 2017-08-02 09:13:31 +00:00
Hugo Benichi
2b3e495224 Merge "NetworkNotificationManager: correctly handle existing notifications" am: 3451fb6156 am: ef7d6d93c3 am: 5cbf7e2dc8
am: 1609fe7fe3

Change-Id: Ieed9e3e7755e0c5f89dc41ef66f47d4dbf4c66a9
2017-07-27 15:08:19 +00:00
Hugo Benichi
1609fe7fe3 Merge "NetworkNotificationManager: correctly handle existing notifications" am: 3451fb6156 am: ef7d6d93c3
am: 5cbf7e2dc8

Change-Id: I73cc879e910d503946facdba498b300337f349fd
2017-07-27 14:58:32 +00:00
Hugo Benichi
5cbf7e2dc8 Merge "NetworkNotificationManager: correctly handle existing notifications" am: 3451fb6156
am: ef7d6d93c3

Change-Id: I74631b0bfd14daf18a1641ed7f2ec323d636ebbf
2017-07-27 14:50:14 +00:00
Hugo Benichi
ef7d6d93c3 Merge "NetworkNotificationManager: correctly handle existing notifications"
am: 3451fb6156

Change-Id: I4432f66067ea1ab02e1d2dfe42530bcdafa52df6
2017-07-27 14:43:48 +00:00
Hugo Benichi
5fcd050e0e NetworkNotificationManager: correctly handle existing notifications
This patch corrects a regression added by commit fb2609d3ee that did
not take into account the case of multiple notifications shown for a
single network id. Given how network notifications are triggered, it can
happen that NO_INTERNET and SIGN_IN notifications are both triggered for
the same network when captive portal detection is slow.

Contrary to the situation before commit fb2609d3ee, a notification
priority order is introduced so that SIGN_IN always overrides
NO_INTERNET, and NO_INTERNET is ignored if SIGN_IN is already present.

Bug: 63676954
Bug: 62503737
Test: runtest frameworks-net, added new unit tests
Change-Id: Ib8658601e8d4dc6c41b335ab7dd8caa0cccd9531
2017-07-27 21:20:20 +09:00
Hugo Benichi
2b691d874f Merge "Bootstrap IpReachabilityMonitor unit tests" am: a9889c94aa am: 39a707813b am: 5bc28905b6
am: 9b88e173c7

Change-Id: I060c17bf421771dd09305696344cb77a4382b46e
2017-07-25 14:51:40 +00:00
Hugo Benichi
9b88e173c7 Merge "Bootstrap IpReachabilityMonitor unit tests" am: a9889c94aa am: 39a707813b
am: 5bc28905b6

Change-Id: I9ca394ccac1683d5d91b426582cfb3cddb5f5e96
2017-07-25 14:45:35 +00:00
Hugo Benichi
5bc28905b6 Merge "Bootstrap IpReachabilityMonitor unit tests" am: a9889c94aa
am: 39a707813b

Change-Id: Ie56377ae158d32a3592fd700e93fc827754ecaa3
2017-07-25 14:39:40 +00:00
Hugo Benichi
39a707813b Merge "Bootstrap IpReachabilityMonitor unit tests"
am: a9889c94aa

Change-Id: Ic3b145159a4c0430cc248a19b8527af40fa67696
2017-07-25 14:33:45 +00:00
Hugo Benichi
06b1f2b173 Bootstrap IpReachabilityMonitor unit tests
Bug: 62918393
Test: runtest frameworks-net

Change-Id: I236029f460dc3631ef9f5d8312dc1c6faf9807df
2017-07-25 14:59:48 +09:00
Hugo Benichi
eff89fc84e Merge "IpManagerTest: fix flaky test for real" am: e0a743d035 am: 3d423c9c39 am: 8b8a0ef586
am: 34ad34d199

Change-Id: Icf07be6dcb2bb87307b87af4ffed7d77413c49c7
2017-07-21 08:33:46 +00:00
Hugo Benichi
34ad34d199 Merge "IpManagerTest: fix flaky test for real" am: e0a743d035 am: 3d423c9c39
am: 8b8a0ef586

Change-Id: I63414de17f71be8f8e24296ba820f5e855f2975f
2017-07-21 08:26:49 +00:00
Hugo Benichi
8b8a0ef586 Merge "IpManagerTest: fix flaky test for real" am: e0a743d035
am: 3d423c9c39

Change-Id: If8173e2b320e252ac9dcb95d1967472d505f1121
2017-07-21 08:21:48 +00:00
Hugo Benichi
3d423c9c39 Merge "IpManagerTest: fix flaky test for real"
am: e0a743d035

Change-Id: If1e0024d81bb24586f2cbd691e39a2d66f827c41
2017-07-21 08:15:20 +00:00
Treehugger Robot
e0a743d035 Merge "IpManagerTest: fix flaky test for real" 2017-07-21 08:07:40 +00:00
Hugo Benichi
e9bdc19a43 IpManagerTest: fix flaky test for real
Commit c10fe5f463 tried to fix the flaky unit test for a default
ProvisioningConfiguration but failed to reinitialize the mock class
involved, so that in practice the flaky assertion is as flaky as before.

This patch correctly resets the mock after the default assertions are
done once an IpManager object is created.

Bug: 32561414
Bug: 62918393
Test: runtest frameworks-net
Change-Id: I516b6981f96e83a90cb372a727c41f0b2ea59801
2017-07-21 14:14:25 +09:00
Di Lu
b29659421e Merge "Add unit test for IpSecService" am: 9e3f886dca am: 3182454f28 am: 345db82674
am: 636033782b

Change-Id: I788e4e8466a76f80d1f15330e6d3b91b73be1d32
2017-07-20 08:42:27 +00:00
Di Lu
3eedbf543c Merge "Add unit test for IpSecManager" am: dd494fa91c am: 73b7292a05 am: eb7bc05b32
am: aadf75714a

Change-Id: Iecf36183010f78920ef4112b9b0a0febf4ece82c
2017-07-20 08:38:36 +00:00
Di Lu
636033782b Merge "Add unit test for IpSecService" am: 9e3f886dca am: 3182454f28
am: 345db82674

Change-Id: Ia4d85bcf5c42774d7b48cb1cd648754b6dd16b69
2017-07-20 07:50:21 +00:00
Di Lu
345db82674 Merge "Add unit test for IpSecService" am: 9e3f886dca
am: 3182454f28

Change-Id: Iee7cc50b7f4715d9c6797356be5cac705407d4bc
2017-07-20 07:43:12 +00:00
Di Lu
3182454f28 Merge "Add unit test for IpSecService"
am: 9e3f886dca

Change-Id: I16fb89239e641ac39a8a7adeafd72b7fe03935ed
2017-07-20 07:36:19 +00:00
Di Lu
9e3f886dca Merge "Add unit test for IpSecService" 2017-07-20 07:27:16 +00:00
Di Lu
aadf75714a Merge "Add unit test for IpSecManager" am: dd494fa91c am: 73b7292a05
am: eb7bc05b32

Change-Id: I399513b63dd5c06bab2946be315cc5c5689dff29
2017-07-20 06:04:11 +00:00
Di Lu
eb7bc05b32 Merge "Add unit test for IpSecManager" am: dd494fa91c
am: 73b7292a05

Change-Id: I33cb28b9ca07126e4f1b2631604fccf94ae4b530
2017-07-20 05:57:40 +00:00
Di Lu
73b7292a05 Merge "Add unit test for IpSecManager"
am: dd494fa91c

Change-Id: I56c336eb8234b31154b6a7defd95ce76ea0800d8
2017-07-20 05:52:10 +00:00
Di Lu
dd494fa91c Merge "Add unit test for IpSecManager" 2017-07-20 05:42:53 +00:00
ludi
1a06aa75e5 Add unit test for IpSecService
Test: runtest frameworks-net

Bug:38259578
Change-Id: I4a049d5fdec79e36692e3b12306bd0758c19ad75
2017-07-20 04:26:24 +00:00
Ahmed ElArabawy
2d0f47c40f Merge "Add Configuration to APF Policy" am: d27a6d62c6
am: 70291ef1d7

Change-Id: Ib2881c42b6eb149ac4f964d9d8d29ac74a057000
2017-07-20 03:54:03 +00:00
Ahmed ElArabawy
70291ef1d7 Merge "Add Configuration to APF Policy"
am: d27a6d62c6

Change-Id: I491bad86e4e9ae7a813ac214b06273719a583079
2017-07-20 03:46:08 +00:00
Treehugger Robot
d27a6d62c6 Merge "Add Configuration to APF Policy" 2017-07-20 03:34:57 +00:00
Ahmed ElArabawy
8537c58cc8 Add Configuration to APF Policy
in b/37702435 battery was drained due to reception of
Ethernet frames with Eth-type < 0x600 (non ehternet II frames)

This change adds an XML file to drop/allow these frames
Dropping helps tp avoid acquiring a wakelock for the
reception of these packets, while allowing them may be needed
for some protocols
The Change allow the OEM to override the system settings

Bug: 37702435
Test: runtest frameworks-net
Merged-In: Idb6c215896ef230a8136ff4ecefc90ccdc5c1c6d
Merged-In: I16346bb98a0b9259f7c3f51e318c472cfc1bb492

Signed-off-by: Ahmed ElArabawy <arabawy@google.com>

(cherry pick from commit 4dd7c58fc8)

Change-Id: Ie466baf1e6395d6c28245e41179232ea8e523845
2017-07-20 11:22:46 +09:00
ludi
90de61b3ed Add unit test for IpSecManager
Test: runtest frameworks-net

Bug:38259578
Change-Id: Idb76aab899ccb7145bef2b7dce36e115c25fa6ca
2017-07-19 18:59:12 -07:00
Ahmed ElArabawy
e9685cab9a Merge "Add Configuration to APF Policy" into oc-dr1-dev am: 1da6af31ff
am: 1885632105

Change-Id: I5949798a6531344ed90301f452165838fa8adb6a
2017-07-19 22:17:21 +00:00