OSDN Git Service

android-x86/system-netd.git
10 years agoMerge "Pass NetID to clatd as a command line argument."
Paul Jensen [Tue, 3 Jun 2014 17:24:46 +0000 (17:24 +0000)]
Merge "Pass NetID to clatd as a command line argument."

10 years agoPass NetID to clatd as a command line argument.
Paul Jensen [Fri, 30 May 2014 17:29:41 +0000 (13:29 -0400)]
Pass NetID to clatd as a command line argument.

Change-Id: I77a47b24e68c7786f790974f05787a40a4934af5

10 years agoUse AF_INET sockets when checking netIds in setNetworkFor{Process,Resolv}().
Sreeram Ramachandran [Sat, 31 May 2014 02:59:51 +0000 (19:59 -0700)]
Use AF_INET sockets when checking netIds in setNetworkFor{Process,Resolv}().

AF_UNIX sockets don't need to be marked, so we don't give netd the permission to
operate on them (cf: netd.te). I.e., netd doesn't expect to receive them.

Make sure that the creation of the AF_INET socket doesn't trigger another
wasteful check with netd by calling the libc version directly.

Bug: 13885501
Change-Id: I6b549232e57cacd47501edcefa4c0b4b79df9da0

10 years agoFix build.
Sreeram Ramachandran [Fri, 30 May 2014 22:11:54 +0000 (15:11 -0700)]
Fix build.

Change-Id: If170e46ff92c6a972bc1c2d838b1ac0eea6e23de

10 years agoam 82eab785: Support legacy routes added by apps via ensureRouteToHost().
Sreeram Ramachandran [Fri, 30 May 2014 21:33:07 +0000 (21:33 +0000)]
am 82eab785: Support legacy routes added by apps via ensureRouteToHost().

* commit '82eab785bd5cb2eff0a263f5b0dcde13e9139588':
  Support legacy routes added by apps via ensureRouteToHost().

10 years agoSupport legacy routes added by apps via ensureRouteToHost().
Sreeram Ramachandran [Thu, 22 May 2014 21:21:49 +0000 (14:21 -0700)]
Support legacy routes added by apps via ensureRouteToHost().

This adds the routes to two fixed tables:
+ LEGACY, which has higher priority than other non-explicit lookup tables
  (per-network and default network).
+ PRIVILEGED_LEGACY, available only to system apps and has higher priority than
  VPNs (system apps are those with the CONNECTIVITY_INTERNAL permission).

This will be changed to per-UID tables once the kernel supports UID-based
routing, so that these legacy routes are scoped to each app and not global.

Also, fix a TODO: The framework (as of http://ag/471599) will not set the
gateway argument if it's actually a direct-connected route.

Change-Id: I0ee1ca89fdc859d75a89021ca8c1902811b1e4a9
(cherry picked from commit 38b7af1f2cb9579895465fabc37865f5dadcac25)

10 years agoam ce8f583f: Set errno in NetworkController commands.
Lorenzo Colitti [Fri, 30 May 2014 15:06:46 +0000 (15:06 +0000)]
am ce8f583f: Set errno in NetworkController commands.

* commit 'ce8f583ff6620a19602d3c4604557e1b1501cafa':
  Set errno in NetworkController commands.

10 years agoam a5d68758: merge in master-release history after reset to ec00884cac216d1cb79556ca2...
The Android Automerger [Fri, 30 May 2014 15:06:46 +0000 (15:06 +0000)]
am a5d68758: merge in master-release history after reset to ec00884cac216d1cb79556ca23b21ce55e35af3e

* commit 'a5d6875887a63797711093a169e7ef19c5a1ab3b':
  Fix for DNS resolutions when there is no default network set yet. We need to determine the actual netId to use prior to comparing it against the default netId.  Also initialize the default network variable.

10 years agoTurn on C++11 and make all warnings into errors.
Sreeram Ramachandran [Wed, 28 May 2014 22:07:00 +0000 (15:07 -0700)]
Turn on C++11 and make all warnings into errors.

As a consequence:
+ Comment out the names of all unused parameters.
+ Remove all unused variables and functions.

In server/Android.mk, there are a couple of non-trivial changes:
+ Use libcxx instead of stlport. This is needed to fix a bunch of errors due to
  specifying -std=c++11.
+ LOCAL_SHARED_LIBRARIES is sorted. Technically, the order in which libraries
  are listed has an effect on linking, but nobody should be doing such brittle
  things anyway.

Change-Id: I0aff5b745e04609da23144d0e8be4c5694321b8b

10 years agoSupport legacy routes added by apps via ensureRouteToHost().
Sreeram Ramachandran [Thu, 22 May 2014 21:21:49 +0000 (14:21 -0700)]
Support legacy routes added by apps via ensureRouteToHost().

This adds the routes to two fixed tables:
+ LEGACY, which has higher priority than other non-explicit lookup tables
  (per-network and default network).
+ PRIVILEGED_LEGACY, available only to system apps and has higher priority than
  VPNs (system apps are those with the CONNECTIVITY_INTERNAL permission).

This will be changed to per-UID tables once the kernel supports UID-based
routing, so that these legacy routes are scoped to each app and not global.

Also, fix a TODO: The framework (as of http://ag/471599) will not set the
gateway argument if it's actually a direct-connected route.

Change-Id: I0ee1ca89fdc859d75a89021ca8c1902811b1e4a9

10 years agoSet errno in NetworkController commands.
Lorenzo Colitti [Thu, 29 May 2014 03:20:55 +0000 (12:20 +0900)]
Set errno in NetworkController commands.

Set errno in the NetworkController functions that are called by
CommandListener and where failure causes an operationError. This
is because operationError always appends errno to its messages,
and

"400 481 addInterfaceToNetwork() failed (Device or resource busy)"

is more useful than:

"400 481 addInterfaceToNetwork() failed (Success)"

We already call ALOGE to put descriptive messages in the system
log, but the bugreport already conveniently aggregates all netd
commands in one place in the network_management service dump, and
it would help if the errno in those messages were accurate.

Unfortunately many of the route and iptables commands shell out
to /sbin/ip and we can't return meaningful values, but we'll
fix that when (if?) we replace that with a proper netlink
implementation.

Bug: 15316764
Change-Id: Ia47f451029d611491aa72bca602de77333f2c6a0

10 years agomerge in master-release history after reset to ec00884cac216d1cb79556ca23b21ce55e35af3e
The Android Automerger [Thu, 22 May 2014 14:22:41 +0000 (07:22 -0700)]
merge in master-release history after reset to ec00884cac216d1cb79556ca23b21ce55e35af3e

10 years agomerge in master-release history after reset to ec00884cac216d1cb79556ca23b21ce55e35af3e
The Android Automerger [Thu, 22 May 2014 12:51:13 +0000 (05:51 -0700)]
merge in master-release history after reset to ec00884cac216d1cb79556ca23b21ce55e35af3e

10 years agoImplement the "select network" fwmark command.
Sreeram Ramachandran [Wed, 21 May 2014 21:01:16 +0000 (14:01 -0700)]
Implement the "select network" fwmark command.

Change-Id: Id4a49eb288b18022d53014d1ae2211ed7d1099a6

10 years agoRework the determination of a "valid network".
Sreeram Ramachandran [Wed, 21 May 2014 20:19:43 +0000 (13:19 -0700)]
Rework the determination of a "valid network".

+ isNetIdValid() doesn't make much sense. What we want is whether the netId has
  actually been created (via createNetwork()).
+ It isn't an error to call deleteNetwork() or setDefaultNetwork() even when
  there are no interfaces assigned to the network.
+ Secure all accesses to the maps in PermissionsController with locks; they are
  called from many threads (CommandListener, DnsProxyListener and FwmarkServer).
+ Remove the redundant mIfaceNetidMap.
+ Minor cosmetic changes to things such as #includes and log messages.

Change-Id: Ieb154589b24f00ba8067eaaec4def3534aec4923

10 years agoMark sockets on creation (socket()) and accept4().
Sreeram Ramachandran [Wed, 21 May 2014 20:08:34 +0000 (13:08 -0700)]
Mark sockets on creation (socket()) and accept4().

Continued from: https://android-review.git.corp.google.com/#/c/95094/

Change-Id: Ib0b8f5d7c5013b91eae6bbc3847852eb355c7714

10 years agoNew network selection APIs.
Sreeram Ramachandran [Wed, 21 May 2014 18:41:39 +0000 (11:41 -0700)]
New network selection APIs.

Continued from: https://android-review.git.corp.google.com/#/c/94977/

Change-Id: Ie0576888f50a8ce91bbb0a4794708b406eb0aa35

10 years agoMove netd_client into netd.
Sreeram Ramachandran [Wed, 21 May 2014 15:54:07 +0000 (08:54 -0700)]
Move netd_client into netd.

Change-Id: Ie4b6b303225c93f2448a503d6ea9cebb552cbad5

10 years agomerge in master-release history after reset to 5ff58d494a5ddf7e544adc77590300f04daf8e31
The Android Automerger [Wed, 21 May 2014 12:51:08 +0000 (05:51 -0700)]
merge in master-release history after reset to 5ff58d494a5ddf7e544adc77590300f04daf8e31

10 years agomerge in master-release history after reset to 5ff58d494a5ddf7e544adc77590300f04daf8e31
The Android Automerger [Tue, 20 May 2014 12:51:24 +0000 (05:51 -0700)]
merge in master-release history after reset to 5ff58d494a5ddf7e544adc77590300f04daf8e31

10 years agomerge in master-release history after reset to 5ff58d494a5ddf7e544adc77590300f04daf8e31
The Android Automerger [Mon, 19 May 2014 12:50:25 +0000 (05:50 -0700)]
merge in master-release history after reset to 5ff58d494a5ddf7e544adc77590300f04daf8e31

10 years agomerge in master-release history after reset to 5ff58d494a5ddf7e544adc77590300f04daf8e31
The Android Automerger [Sun, 18 May 2014 12:50:12 +0000 (05:50 -0700)]
merge in master-release history after reset to 5ff58d494a5ddf7e544adc77590300f04daf8e31

10 years agomerge in master-release history after reset to 5ff58d494a5ddf7e544adc77590300f04daf8e31
The Android Automerger [Sat, 17 May 2014 12:51:51 +0000 (05:51 -0700)]
merge in master-release history after reset to 5ff58d494a5ddf7e544adc77590300f04daf8e31

10 years agomerge in master-release history after reset to 5ff58d494a5ddf7e544adc77590300f04daf8e31
The Android Automerger [Thu, 15 May 2014 12:51:28 +0000 (05:51 -0700)]
merge in master-release history after reset to 5ff58d494a5ddf7e544adc77590300f04daf8e31

10 years agoFix build by using the right type (socklen_t instead of int).
Sreeram Ramachandran [Wed, 14 May 2014 16:57:31 +0000 (09:57 -0700)]
Fix build by using the right type (socklen_t instead of int).

Change-Id: Ia4a56ef679269755a3787408821c0cda6aec9420

10 years agoMark sockets on accept().
Sreeram Ramachandran [Tue, 13 May 2014 20:25:34 +0000 (13:25 -0700)]
Mark sockets on accept().

The kernel marks the netId into the accepted socket, so we just set the socket
owner's permission bits here in userspace.

We also check the permissions required by the network and return an error if
they are not satisfied. This avoids the "half-open" problem where an app listens
on all networks (interfaces) with bind(0), and receives an incoming connection
on a privileged interface that it can't send responses over.

(cherry picked from commit 920747a009efbb815465d980ec6a918531e74e9f)

Change-Id: I5d09be413cf720fbed905f96313b007997ada76c

10 years agoIntroduce fwmarkd: a service to set the fwmark of sockets.
Sreeram Ramachandran [Mon, 12 May 2014 04:04:03 +0000 (21:04 -0700)]
Introduce fwmarkd: a service to set the fwmark of sockets.

At connect(), mark sockets with the default network's netId.

(cherry picked from commit 361154d38016ebeaabf1bb75534dabbacf5de5fa)

Change-Id: Ib6198e19dbc306521a26fcecfdf6e8424d163fc9

10 years agoRemove redundant cache deletion.
Sreeram Ramachandran [Wed, 14 May 2014 15:36:26 +0000 (08:36 -0700)]
Remove redundant cache deletion.

This was added in http://ag/465643 as part of the merge from
master-multinetwork-dev to master, but was unnecessary, since it was already
added to NetworkController.cpp in http://ag/465593.

Change-Id: Ic9a56a5276ca6d58cf5fec60f89f30c2285aa35e

10 years agoInitialize mDefaultNetId.
Sreeram Ramachandran [Wed, 14 May 2014 15:31:55 +0000 (08:31 -0700)]
Initialize mDefaultNetId.

This was accidentally dropped in the merge from master-multinetwork-dev to
master, in http://ag/465644.

Change-Id: I0699604923477e6b19dfc8c70a84c50a79fe3d72

10 years agomerge in master-release history after reset to 3ced06906759b3ce252e114fcc9c98fa36228911
The Android Automerger [Wed, 14 May 2014 12:51:47 +0000 (05:51 -0700)]
merge in master-release history after reset to 3ced06906759b3ce252e114fcc9c98fa36228911

10 years agoAddress TODO to uncomment _resolv_delete_cache_for_net.
Lorenzo Colitti [Wed, 14 May 2014 11:44:46 +0000 (04:44 -0700)]
Address TODO to uncomment _resolv_delete_cache_for_net.

Change-Id: I581e6f2afaac25db04a87ac70703a02a669b5edf

10 years agoRefactor the fwmark stuff to use an explicit union of bit-fields.
Sreeram Ramachandran [Mon, 12 May 2014 03:29:49 +0000 (20:29 -0700)]
Refactor the fwmark stuff to use an explicit union of bit-fields.

This is a pure refactor. There's no effect on any functionality.

Change-Id: I99d1f3fb76781cf84f67c2dff44eaf3a2cf50a9f

10 years agoSeparate network and interface addition/removal netd APIs.
Paul Jensen [Mon, 28 Apr 2014 14:35:51 +0000 (10:35 -0400)]
Separate network and interface addition/removal netd APIs.
This should facilitate stacked interfaces (i.e. clatd).

Change-Id: Ib3e7a4d3847ef6ec4449451f6da42e75959baa4f

10 years agoIgnore failure when adding directly-connected routes to the main table.
Sreeram Ramachandran [Thu, 24 Apr 2014 23:23:35 +0000 (16:23 -0700)]
Ignore failure when adding directly-connected routes to the main table.

Change-Id: I12f65cdfbe2285820bd24b047f794ec9b9b5110f

10 years agoFixes for stupid mistakes (by me).
Sreeram Ramachandran [Thu, 24 Apr 2014 22:55:26 +0000 (15:55 -0700)]
Fixes for stupid mistakes (by me).

+ Only remove netId/permission after doing everything that references them.
+ Return success/failure correctly based on return value of fork/exec.

Conflicts:
NetworkController.cpp

Change-Id: Iddb8ccdffc104ffed1058ecc2421006beebd568d

10 years agoAdd directly-connected routes to the main table.
Sreeram Ramachandran [Wed, 16 Apr 2014 19:32:18 +0000 (12:32 -0700)]
Add directly-connected routes to the main table.

Change-Id: I545555d273ea9d321eab08fef12a32ca17e33dff

10 years agoUse proper socket mark for DNS resolution.
Paul Jensen [Thu, 17 Apr 2014 21:25:43 +0000 (17:25 -0400)]
Use proper socket mark for DNS resolution.

Change-Id: I531ff0fbce6e7172b82bc2d4c7406a324603eb8a

10 years agonetd: Accept NetId instead of interface name in DNS resolver commands.
Paul Jensen [Thu, 10 Apr 2014 18:57:54 +0000 (14:57 -0400)]
netd: Accept NetId instead of interface name in DNS resolver commands.

Conflicts:
DnsProxyListener.cpp
NetworkController.cpp
NetworkController.h

Change-Id: Ic82b73de6f50d39d56c5e1a32f5b1f3ebb80bb7d

10 years agoWhen deleteing a network also delete the resolver cache for that
Paul Jensen [Thu, 17 Apr 2014 20:05:35 +0000 (16:05 -0400)]
When deleteing a network also delete the resolver cache for that
network.

Change-Id: I99d058bafea5de743e56075dbed74031da4df63f

10 years agoCosmetic: Move logic from CommandListener into NetworkController.
Sreeram Ramachandran [Fri, 18 Apr 2014 16:49:13 +0000 (09:49 -0700)]
Cosmetic: Move logic from CommandListener into NetworkController.

CommandListener should just unmarshal params, and delegate all functional logic
to NetworkController (or other such classes). So, for example, if you call
destroyNetwork() directly from a unit test, you should get the same effect as if
you sent a "network destroy" command to CommandListener.

(cherry picked from commit f7743bf18672d654e79565e85c7d3770e2f0f26c)

Change-Id: Ic61ae9141e2eea95394a3a38e30a72fe964cdc81

10 years agoUpdate the "lookup main" rule to include a fwmark clause.
Sreeram Ramachandran [Wed, 16 Apr 2014 19:08:05 +0000 (12:08 -0700)]
Update the "lookup main" rule to include a fwmark clause.

If a packet is marked with a non-zero NetId, and doesn't find a route in its
per-network table, it will now not match the main table rule, and so will
fallthrough to the "unreachable" rule, resulting in ENETUNREACH, as desired.

If a packet has a zero NetId (e.g.: sent on an unconnected UDP socket), it will
find the "default network" rule first, which should have a default route, so it
will never need to fall through any further to the main table.

This makes the main table effectively unused for all normal routing lookups.

Only the kernel will still use this table, when trying to find a directly
connected route to validate the nexthop when a route is added anywhere.

(cherry picked from commit 4594dbba433dadba953c1c7b43fdd99e77fb1f2b)

Change-Id: Ib0784ff0848854be0575c64a59bbd0a4d3bf93e0

10 years agoFlush (delete) routing tables when destroying a network.
Sreeram Ramachandran [Tue, 15 Apr 2014 21:28:55 +0000 (14:28 -0700)]
Flush (delete) routing tables when destroying a network.

(cherry picked from commit 7ee2c3fe24f9a643584ddf5f759a7acb73e35e8d)

Change-Id: I1b222b474b1ae7a551250f8f02d7900c493b5b16

10 years agoImplement the "network route add/remove" API.
Sreeram Ramachandran [Tue, 15 Apr 2014 21:23:08 +0000 (14:23 -0700)]
Implement the "network route add/remove" API.

(cherry picked from commit 909c52248a4ad832548c5feb5e9a58323e30ab7b)

Change-Id: Idb09b0c22a3a519dda232995ced406e470ab9768

10 years agoImplement network default set/clear.
Sreeram Ramachandran [Fri, 11 Apr 2014 03:35:04 +0000 (20:35 -0700)]
Implement network default set/clear.

(cherry picked from commit 4cc7df247a7ec67da3b5edfb9356077fbbf0150c)

Change-Id: Ib35d54816884c6a6ba28231c9b1f54e362d1d16a

10 years agoImplement permissions set/clear for both networks and users.
Sreeram Ramachandran [Fri, 11 Apr 2014 02:58:06 +0000 (19:58 -0700)]
Implement permissions set/clear for both networks and users.

(cherry picked from commit 47a0fa0ad402704b639fbc2868c55adc432bb6ea)

Change-Id: Ibb71025e1e2c72bd300fb7379d5ab54da4a6982e

10 years agoMove sprintf statements to getRouteTableForInterface.
Lorenzo Colitti [Fri, 11 Apr 2014 09:26:17 +0000 (18:26 +0900)]
Move sprintf statements to getRouteTableForInterface.

(cherry picked from commit b45648ad5902e53f433615ab1a0268927b6a328e)

Change-Id: Ie0b2c3e3688285068b70e96d1153c0b105548a00

10 years agoCleanup: Minor style fixes.
Sreeram Ramachandran [Fri, 11 Apr 2014 02:37:59 +0000 (19:37 -0700)]
Cleanup: Minor style fixes.

(cherry picked from commit 49d905456fd6cf730abdddb49df84d6032b0a419)

Change-Id: I199447f03ce33d79007e62e23ccf683ed4249f97

10 years agoSet kernel proc files for fwmark reflection and table numbers for RAs.
Sreeram Ramachandran [Thu, 10 Apr 2014 19:10:24 +0000 (12:10 -0700)]
Set kernel proc files for fwmark reflection and table numbers for RAs.

(cherry picked from commit 75992274574e91c9a17aad5b60f0c2b710cd31b9)

Change-Id: I5f0d759cb9b8590555af7f5503f00d3e455ece54

10 years agoImplement network create/destroy.
Sreeram Ramachandran [Mon, 7 Apr 2014 21:10:04 +0000 (14:10 -0700)]
Implement network create/destroy.

(cherry picked from commit 382fc20107aa38cca062f10b4bc05c47b6c7f191)

Change-Id: Id5f8df447d812c8e8cf03addbb5e70abdcdfceb9

10 years agoIntroduce Netd APIs for multinetworks.
Sreeram Ramachandran [Thu, 27 Mar 2014 01:33:47 +0000 (18:33 -0700)]
Introduce Netd APIs for multinetworks.

Just stubs for now. Implementation will follow in subsequent CLs.

Change-Id: I10a2e4aca594c10a26d58afb4c250141386d3f0f
(cherry picked from commit 0d5146bed37b4e5b6909617e5f958a66bfee1e48)

10 years agomerge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c
The Android Automerger [Tue, 13 May 2014 12:51:15 +0000 (05:51 -0700)]
merge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c

10 years agomerge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c
The Android Automerger [Mon, 12 May 2014 12:50:19 +0000 (05:50 -0700)]
merge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c

10 years agomerge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c
The Android Automerger [Sun, 11 May 2014 12:50:08 +0000 (05:50 -0700)]
merge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c

10 years agomerge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c
The Android Automerger [Sat, 10 May 2014 12:51:26 +0000 (05:51 -0700)]
merge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c

10 years agomerge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c
The Android Automerger [Thu, 8 May 2014 12:51:02 +0000 (05:51 -0700)]
merge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c

10 years agomerge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c
The Android Automerger [Wed, 7 May 2014 16:11:44 +0000 (09:11 -0700)]
merge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c

10 years agomerge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c
The Android Automerger [Wed, 7 May 2014 12:51:17 +0000 (05:51 -0700)]
merge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c

10 years agomerge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c
The Android Automerger [Tue, 6 May 2014 12:51:02 +0000 (05:51 -0700)]
merge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c

10 years agomerge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c
The Android Automerger [Mon, 5 May 2014 12:50:16 +0000 (05:50 -0700)]
merge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c

10 years agomerge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c
The Android Automerger [Sun, 4 May 2014 12:50:08 +0000 (05:50 -0700)]
merge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c

10 years agomerge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c
The Android Automerger [Sat, 3 May 2014 12:51:48 +0000 (05:51 -0700)]
merge in master-release history after reset to 978d30d0e046c971b37a6fc20480615f1c55f55c

10 years agoam 551e5b47: am 553dc723: BandwidthController: validate interface / chain names
Nick Kralevich [Thu, 1 May 2014 22:41:29 +0000 (22:41 +0000)]
am 551e5b47: am 553dc723: BandwidthController: validate interface / chain names

* commit '551e5b47a21294cf775f8effbb6f2bf34c664164':
  BandwidthController: validate interface / chain names

10 years agoam 553dc723: BandwidthController: validate interface / chain names
Nick Kralevich [Thu, 1 May 2014 22:38:20 +0000 (22:38 +0000)]
am 553dc723: BandwidthController: validate interface / chain names

* commit '553dc723163798720bf59d452688ad0ae946b29e':
  BandwidthController: validate interface / chain names

10 years agoBandwidthController: validate interface / chain names
Nick Kralevich [Thu, 1 May 2014 20:10:45 +0000 (13:10 -0700)]
BandwidthController: validate interface / chain names

Only allow alphanumeric, dashes, underscores, or colons in
interface and chain names. First character must be alphanumeric.

Bug: 14320836
Bug: 14323009
Change-Id: Ieac729719d0f9038f60c7afcb327f17d292d6ca6
(cherry picked from commit 0b2b9021ee27af2449c433fa13ed5c57e55dd816)

10 years agoBandwidthController: validate interface / chain names
Nick Kralevich [Thu, 1 May 2014 20:10:45 +0000 (13:10 -0700)]
BandwidthController: validate interface / chain names

Only allow alphanumeric, dashes, underscores, or colons in
interface and chain names. First character must be alphanumeric.

Bug: 14320836
Bug: 14323009
Change-Id: Ieac729719d0f9038f60c7afcb327f17d292d6ca6

10 years agomerge in master-release history after reset to 202633d0aa99de903f57c8372cc72b7349ba38e4
The Android Automerger [Thu, 1 May 2014 12:51:32 +0000 (05:51 -0700)]
merge in master-release history after reset to 202633d0aa99de903f57c8372cc72b7349ba38e4

10 years agomerge in master-release history after reset to 4c2b869a3a30b257acce46d470e92e835a9eb82c
The Android Automerger [Wed, 30 Apr 2014 12:51:31 +0000 (05:51 -0700)]
merge in master-release history after reset to 4c2b869a3a30b257acce46d470e92e835a9eb82c

10 years agoam 47939704: am 428c861a: (-s ours) Merge klp-dev-plus-aosp into stage-aosp-master
Bill Yi [Wed, 30 Apr 2014 12:50:58 +0000 (12:50 +0000)]
am 47939704: am 428c861a: (-s ours) Merge klp-dev-plus-aosp into stage-aosp-master

* commit '479397047075e236af9b23848371aa302d95c213':

10 years agoam 428c861a: (-s ours) Merge klp-dev-plus-aosp into stage-aosp-master
Bill Yi [Wed, 30 Apr 2014 01:13:18 +0000 (01:13 +0000)]
am 428c861a: (-s ours) Merge klp-dev-plus-aosp into stage-aosp-master

* commit '428c861a8e8aed4aa3224bd8d18211c9e6ca1c64':

10 years agoMerge klp-dev-plus-aosp into stage-aosp-master
Bill Yi [Tue, 29 Apr 2014 22:30:33 +0000 (15:30 -0700)]
Merge klp-dev-plus-aosp into stage-aosp-master

Change-Id: I1c46e9613eb7638531b6abffee43ffc94b116018

10 years agomerge in master-release history after reset to 4c2b869a3a30b257acce46d470e92e835a9eb82c
The Android Automerger [Tue, 29 Apr 2014 12:51:18 +0000 (05:51 -0700)]
merge in master-release history after reset to 4c2b869a3a30b257acce46d470e92e835a9eb82c

10 years agomerge in master-release history after reset to 4c2b869a3a30b257acce46d470e92e835a9eb82c
The Android Automerger [Mon, 28 Apr 2014 12:49:59 +0000 (05:49 -0700)]
merge in master-release history after reset to 4c2b869a3a30b257acce46d470e92e835a9eb82c

10 years agomerge in master-release history after reset to 4c2b869a3a30b257acce46d470e92e835a9eb82c
The Android Automerger [Sun, 27 Apr 2014 12:50:04 +0000 (05:50 -0700)]
merge in master-release history after reset to 4c2b869a3a30b257acce46d470e92e835a9eb82c

10 years agomerge in master-release history after reset to 4c2b869a3a30b257acce46d470e92e835a9eb82c
The Android Automerger [Sat, 26 Apr 2014 12:52:53 +0000 (05:52 -0700)]
merge in master-release history after reset to 4c2b869a3a30b257acce46d470e92e835a9eb82c

10 years agomerge in master-release history after reset to 4c2b869a3a30b257acce46d470e92e835a9eb82c
The Android Automerger [Thu, 24 Apr 2014 12:53:14 +0000 (05:53 -0700)]
merge in master-release history after reset to 4c2b869a3a30b257acce46d470e92e835a9eb82c

10 years agomerge in master-release history after reset to master
The Android Automerger [Wed, 23 Apr 2014 12:51:33 +0000 (05:51 -0700)]
merge in master-release history after reset to master

10 years agoam e4f22d3c: am 6aac1ccd: Merge "system: netd: prevent infinite loop"
Robert Greenwalt [Tue, 22 Apr 2014 21:43:01 +0000 (21:43 +0000)]
am e4f22d3c: am 6aac1ccd: Merge "system: netd: prevent infinite loop"

* commit 'e4f22d3cfc4f8826d27e81f9a87d653ef505b5b7':
  system: netd: prevent infinite loop

10 years agoam 6aac1ccd: Merge "system: netd: prevent infinite loop"
Robert Greenwalt [Tue, 22 Apr 2014 21:36:41 +0000 (21:36 +0000)]
am 6aac1ccd: Merge "system: netd: prevent infinite loop"

* commit '6aac1ccd09d590b014566b4000e7f908cc11e9de':
  system: netd: prevent infinite loop

10 years agoMerge "system: netd: prevent infinite loop"
Robert Greenwalt [Tue, 22 Apr 2014 20:51:58 +0000 (20:51 +0000)]
Merge "system: netd: prevent infinite loop"

10 years agomerge in master-release history after reset to master
The Android Automerger [Tue, 22 Apr 2014 12:50:46 +0000 (05:50 -0700)]
merge in master-release history after reset to master

10 years agoam 27f0697e: am 2e6b5f77: Merge "Netd: Drop hard-coded libnetcmdiface path, let the...
Sasha Levitskiy [Mon, 21 Apr 2014 19:35:12 +0000 (19:35 +0000)]
am 27f0697e: am 2e6b5f77: Merge "Netd: Drop hard-coded libnetcmdiface path, let the system auto-resolve to a proper lib version."

* commit '27f0697e654a7e5126e5633bf825a2178f3872e6':
  Netd: Drop hard-coded libnetcmdiface path, let the system auto-resolve to a proper lib version.

10 years agoam 2e6b5f77: Merge "Netd: Drop hard-coded libnetcmdiface path, let the system auto...
Sasha Levitskiy [Mon, 21 Apr 2014 19:32:41 +0000 (19:32 +0000)]
am 2e6b5f77: Merge "Netd: Drop hard-coded libnetcmdiface path, let the system auto-resolve to a proper lib version."

* commit '2e6b5f774d26048f0d3e70ae4bfe65f80a5ea1dd':
  Netd: Drop hard-coded libnetcmdiface path, let the system auto-resolve to a proper lib version.

10 years agoMerge "Netd: Drop hard-coded libnetcmdiface path, let the system auto-resolve to...
Sasha Levitskiy [Mon, 21 Apr 2014 19:25:10 +0000 (19:25 +0000)]
Merge "Netd: Drop hard-coded libnetcmdiface path, let the system auto-resolve to a proper lib version."

10 years agoam ae7e21b3: am d76c8c9c: Merge "Fix for DNS resolutions when there is no default...
Robert Greenwalt [Mon, 21 Apr 2014 18:43:18 +0000 (18:43 +0000)]
am ae7e21b3: am d76c8c9c: Merge "Fix for DNS resolutions when there is no default network set yet. We need to determine the actual netId to use prior to comparing it against the default netId.  Also initialize the default network variable."

* commit 'ae7e21b37f2f196dc2c8b4732b65c6329ec2fae5':
  Fix for DNS resolutions when there is no default network set yet. We need to determine the actual netId to use prior to comparing it against the default netId.  Also initialize the default network variable.

10 years agoam d76c8c9c: Merge "Fix for DNS resolutions when there is no default network set...
Robert Greenwalt [Mon, 21 Apr 2014 18:41:08 +0000 (18:41 +0000)]
am d76c8c9c: Merge "Fix for DNS resolutions when there is no default network set yet. We need to determine the actual netId to use prior to comparing it against the default netId.  Also initialize the default network variable."

* commit 'd76c8c9c66581f310f3d1333405bdcc7fb9c5fb2':
  Fix for DNS resolutions when there is no default network set yet. We need to determine the actual netId to use prior to comparing it against the default netId.  Also initialize the default network variable.

10 years agoMerge "Fix for DNS resolutions when there is no default network set yet. We need...
Robert Greenwalt [Mon, 21 Apr 2014 18:31:32 +0000 (18:31 +0000)]
Merge "Fix for DNS resolutions when there is no default network set yet. We need to determine the actual netId to use prior to comparing it against the default netId.  Also initialize the default network variable."

10 years agoNetd: Drop hard-coded libnetcmdiface path, let the system auto-resolve to a proper...
Sasha Levitskiy [Mon, 21 Apr 2014 18:03:56 +0000 (11:03 -0700)]
Netd: Drop hard-coded libnetcmdiface path, let the system auto-resolve to a proper lib version.

Change-Id: I3604b0610c6aadeaaac7bd970b3d3d190111f0dd
Signed-off-by: Sasha Levitskiy <sanek@google.com>
10 years agoFix for DNS resolutions when there is no default network set yet.
Paul Jensen [Thu, 17 Apr 2014 17:35:33 +0000 (13:35 -0400)]
Fix for DNS resolutions when there is no default network set yet.
We need to determine the actual netId to use prior to comparing
it against the default netId.  Also initialize the default network
variable.

bug:13877665
Change-Id: I24c05eb006e2c93d5e0a9b94fee4da408089d2b8

10 years agoFix for DNS resolutions when there is no default network set yet.
Paul Jensen [Thu, 17 Apr 2014 19:02:32 +0000 (15:02 -0400)]
Fix for DNS resolutions when there is no default network set yet.
We need to determine the actual netId to use prior to comparing
it against the default netId.  Also initialize the default network
variable.

bug:13877665
Change-Id: I24c05eb006e2c93d5e0a9b94fee4da408089d2b8

10 years agoFix for DNS resolutions when there is no default network set yet.
Paul Jensen [Thu, 17 Apr 2014 17:35:33 +0000 (13:35 -0400)]
Fix for DNS resolutions when there is no default network set yet.
We need to determine the actual netId to use prior to comparing
it against the default netId.  Also initialize the default network
variable.

bug:13877665
Change-Id: I24c05eb006e2c93d5e0a9b94fee4da408089d2b8

10 years agoFix build break after a0efaec
Paul Jensen [Fri, 4 Apr 2014 04:04:39 +0000 (00:04 -0400)]
Fix build break after a0efaec

Change-Id: Ie8c77a53a3daeef61527ba4544cae417ade16fef

10 years agoresolved conflicts for merge of 5b49ab9e to master
Paul Jensen [Fri, 4 Apr 2014 03:11:45 +0000 (23:11 -0400)]
resolved conflicts for merge of 5b49ab9e to master

Change-Id: Ib252e3630c5e3b8a38405fc33b147ad365492946

10 years agoresolved conflicts for merge of 45d7b748 to klp-modular-dev-plus-aosp
Paul Jensen [Thu, 3 Apr 2014 23:06:00 +0000 (19:06 -0400)]
resolved conflicts for merge of 45d7b748 to klp-modular-dev-plus-aosp

Change-Id: I924e2c3c654501034dfa7429c0a54d0462fc1571

10 years agoMerge "netd: Replace iface with opaque netid in resolver."
Robert Greenwalt [Thu, 3 Apr 2014 17:05:41 +0000 (17:05 +0000)]
Merge "netd: Replace iface with opaque netid in resolver."

10 years agosystem: netd: prevent infinite loop
Kenneth Tateno [Mon, 10 Mar 2014 21:37:30 +0000 (14:37 -0700)]
system: netd: prevent infinite loop

There is a corner case where rescan() runs between
allocateServiceRef and startMonitoring.  After
allocateServiceRef is called the node at mHead
has mReady = 0.  Then when rescan runs, it loops forver
waiting for mReady != 0, but startMonitoring can't
run because rescan has the lock.

To prevent this, allow rescan to continue to the
next node if mReady == 0.

Change-Id: I7538e00087c02cd6b5553c992bd3c14e1a867a99

10 years agonetd: Replace iface with opaque netid in resolver.
Szymon Jakubczak [Fri, 14 Feb 2014 22:09:43 +0000 (17:09 -0500)]
netd: Replace iface with opaque netid in resolver.

Also ensure that UID mapping (for VPN) cannot be overridden by
android_getaddrinfofornet or per-PID preference.

Change-Id: I9ccfda2902cc0943e87c9bc346ad9a2578accdab

10 years agoam 5faac35c: am 57abed1d: Merge "netd: SCN must be used instead of PRI for scanf...
Mark Salyzyn [Thu, 27 Mar 2014 00:17:41 +0000 (00:17 +0000)]
am 5faac35c: am 57abed1d: Merge "netd: SCN must be used instead of PRI for scanf functions"

* commit '5faac35cc84bae8c96775a5bc9026012378d6fd4':
  netd: SCN must be used instead of PRI for scanf functions

10 years agoam 57abed1d: Merge "netd: SCN must be used instead of PRI for scanf functions"
Mark Salyzyn [Thu, 27 Mar 2014 00:10:36 +0000 (00:10 +0000)]
am 57abed1d: Merge "netd: SCN must be used instead of PRI for scanf functions"

* commit '57abed1d8463b20a28745894d99942bfa9512e1b':
  netd: SCN must be used instead of PRI for scanf functions

10 years agoMerge "netd: SCN must be used instead of PRI for scanf functions"
Mark Salyzyn [Wed, 26 Mar 2014 23:09:03 +0000 (23:09 +0000)]
Merge "netd: SCN must be used instead of PRI for scanf functions"

10 years agonetd: SCN must be used instead of PRI for scanf functions
Mark Salyzyn [Wed, 26 Mar 2014 21:15:03 +0000 (14:15 -0700)]
netd: SCN must be used instead of PRI for scanf functions

Change-Id: I2503fe09e4f90e8339e2b666924f89b33f297af5