OSDN Git Service

android-x86/system-netd.git
13 years agoAdd netd command to clean up IP addresses
Irfan Sheriff [Thu, 16 Jun 2011 17:28:47 +0000 (10:28 -0700)]
Add netd command to clean up IP addresses

Bug: 4676254
Change-Id: Ifb0b573750504f5daeb8db038d13dddd553797de

13 years agosystem/netd: bandwidth management initial support (uid+tag stats)
JP Abgrall [Thu, 16 Jun 2011 01:37:39 +0000 (18:37 -0700)]
system/netd: bandwidth management initial support (uid+tag stats)

This is a minimalistic version to get accounting of data going
through tagged socket per uid.

When netd starts up the BandwidthController, it will look at the
properties for
   persist.bandwidth.enable=1
and enabled it.

It needs the kernel with the xt_qtaguid + iptables/netfilter goodness.
stlport is ok to use.

The "owner" netfilter module used is actually our xt_qtaguid that acts as it
(just until we get around to talking directly the to kernel).

Once
  "ndc bandwidth enable"
is invoked all traffic is counted against the UIDs receiving/sending it.
This allows BlockGuard.java to "tag" sockets and see stats for the tags.

Data shows up in
  /proc/net/xt_qtaguid/stats

  /proc/net/xt_qtaguid/iface_stat/<iface>/
     rx_packets_tcp
     rx_bytes_tcp
     ...
There is no <uid>/...

Supported commands:
 - "ndc bandwidth enable"
   will setup the needed iptable entries to track tag/uid.
 - "ndc bandwidth disable"
   will remove the iptable entries.
 - "ndc bandwidth setquota <iface> <value>"
   will set a quota on the iface.
   Once quota is reached, packets are rejected.
   With the correct kernel, rejects are turned in socket errors.

TODO
----
 * make bandwidth controller cooperate with tethering.
   - they both manipulate the iptables.

Change-Id: Ieb9e7c60ef8c974e99828f7833065d59b2922bf3

13 years agoam 0b0383be: am ac208608: Do not wipe all netd iptables rules in test mode
John Michelau [Thu, 2 Jun 2011 23:51:56 +0000 (16:51 -0700)]
am 0b0383be: am ac208608: Do not wipe all netd iptables rules in test mode

* commit '0b0383befa6843ad32c3ff30da3e91a0c0a8f9c7':
  Do not wipe all netd iptables rules in test mode

13 years agoam ac208608: Do not wipe all netd iptables rules in test mode
John Michelau [Sat, 28 May 2011 04:38:02 +0000 (21:38 -0700)]
am ac208608: Do not wipe all netd iptables rules in test mode

* commit 'ac208608c9e10ef199fdd11c38a31675ee9290c0':
  Do not wipe all netd iptables rules in test mode

13 years agoDo not wipe all netd iptables rules in test mode
John Michelau [Sat, 28 May 2011 03:07:20 +0000 (22:07 -0500)]
Do not wipe all netd iptables rules in test mode

The NatController fail-safe which flushes the iptables when the ref
count reaches zero unintentionally wipes out all static rules setup
by init in bp-tools test mode.  Doing this flush is not necessary.

Change-Id: I37890e79cd701aa2e970958a246dfe7514a65c47

13 years agoReconcile with gingerbread-release
The Android Open Source Project [Fri, 20 May 2011 21:19:45 +0000 (14:19 -0700)]
Reconcile with gingerbread-release

Change-Id: Ibac35b4865cd0c39eff053ad84bddab50a2d6d6e

13 years agoam 442017ef: am e019b659: Add v4/v6 route add/remove to netd.
Robert Greenwalt [Thu, 19 May 2011 14:21:25 +0000 (07:21 -0700)]
am 442017ef: am e019b659: Add v4/v6 route add/remove to netd.

* commit '442017eff8f783a2ea86d73c2ee9d88aef175327':
  Add v4/v6 route add/remove to netd.

13 years agoam e019b659: Add v4/v6 route add/remove to netd.
Robert Greenwalt [Wed, 18 May 2011 23:30:12 +0000 (16:30 -0700)]
am e019b659: Add v4/v6 route add/remove to netd.

* commit 'e019b65925217bcc3ad9b662aa3125f0593057af':
  Add v4/v6 route add/remove to netd.

13 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Fri, 13 May 2011 21:27:38 +0000 (14:27 -0700)]
merge in gingerbread-release history after reset to gingerbread

13 years agoAdd v4/v6 route add/remove to netd.
Robert Greenwalt [Tue, 10 May 2011 21:57:03 +0000 (14:57 -0700)]
Add v4/v6 route add/remove to netd.

Now we can move this out of the framework.
Also adds v6 support and explicit route removal (rather than the big hammer of "remove all").

Change-Id: Ia7f1b12b2175c566c4906064796131a2f7e81466

13 years agoam 38bfbace: resolved conflicts for merge of d1aed628 to honeycomb-plus-aosp
Brian Carlstrom [Tue, 3 May 2011 23:11:54 +0000 (16:11 -0700)]
am 38bfbace: resolved conflicts for merge of d1aed628 to honeycomb-plus-aosp

* commit '38bfbace16fa8dc7e69761e1f29586d0ef5ea90c':
  DNS Proxy should not hang on addresses containing null bytes

13 years agoresolved conflicts for merge of d1aed628 to honeycomb-plus-aosp
Brian Carlstrom [Tue, 3 May 2011 22:11:19 +0000 (15:11 -0700)]
resolved conflicts for merge of d1aed628 to honeycomb-plus-aosp

Change-Id: I6a1ffad61d29c6d361272bdd55522f4bd5f0e2c5

13 years agoMerge "DNS Proxy should not hang on addresses containing null bytes"
Brian Carlstrom [Tue, 3 May 2011 17:21:33 +0000 (10:21 -0700)]
Merge "DNS Proxy should not hang on addresses containing null bytes"

13 years agoam 1eef3e2f: (-s ours) am 1871a4f2: DNS Proxy should not hang on addresses containing...
Brian Carlstrom [Mon, 2 May 2011 18:55:53 +0000 (11:55 -0700)]
am 1eef3e2f: (-s ours) am 1871a4f2: DNS Proxy should not hang on addresses containing null bytes DO NOT MERGE

* commit '1eef3e2f220e264984e1c9a94f3782a1350a3ff9':
  DNS Proxy should not hang on addresses containing null bytes DO NOT MERGE

13 years agoam 1871a4f2: DNS Proxy should not hang on addresses containing null bytes DO NOT...
Brian Carlstrom [Sat, 30 Apr 2011 03:49:44 +0000 (20:49 -0700)]
am 1871a4f2: DNS Proxy should not hang on addresses containing null bytes DO NOT MERGE

* commit '1871a4f2b20f5d2e52d67b6d91da4f8734455cd6':
  DNS Proxy should not hang on addresses containing null bytes DO NOT MERGE

13 years agoDNS Proxy should not hang on addresses containing null bytes
Brian Carlstrom [Fri, 29 Apr 2011 23:49:41 +0000 (16:49 -0700)]
DNS Proxy should not hang on addresses containing null bytes

Two bugs here:

1.) The gethostbyaddr netd protocol was passing a binary address value
    but the arguments are expected to be strings not containing
    embedded nulls (or probably other special characters). This
    happened reliably with IPv6 addresses which contained nulls. It
    now expects an inet_ntop formatted address.

2.) Although the gethostbyaddr code detected something was wrong, it
    wasn't doing any proper error handling, leaving clients hanging
    waiting for a response. It now sends back an empty response so
    that clients can continue.

A corresponding change will be necesssary in bionic for #1 for DNS
proxying to work, but given the fix for #2, the existing bionic code
will fall back to performing its own gethostbyaddr call.

Bug: 4344448
Change-Id: I2a55bb0cd0f1b0670f25c0c93554578bb20404e3

13 years agoDNS Proxy should not hang on addresses containing null bytes DO NOT MERGE
Brian Carlstrom [Wed, 27 Apr 2011 18:47:41 +0000 (11:47 -0700)]
DNS Proxy should not hang on addresses containing null bytes DO NOT MERGE

Two bugs here:

1.) The gethostbyaddr netd protocol was passing a binary address value
    but the arguments are expected to be strings not containing
    embedded nulls (or probably other special characters). This
    happened reliably with IPv6 addresses which contained nulls. It
    now expects an inet_ntop formatted address.

2.) Although the gethostbyaddr code detected something was wrong, it
    wasn't doing any proper error handling, leaving clients hanging
    waiting for a response. It now sends back an empty response so
    that clients can continue.

A corresponding change will be necesssary in bionic for #1 for DNS
proxying to work, but given the fix for #2, the existing bionic code
will fall back to performing its own gethostbyaddr call.

Bug: 4344448
git cherry-pick -e 0475ae98cd8f45de815d67d1966edaf5997be9a9

Change-Id: I0b131032e06c16950b4e6810155529b57814c565

13 years agoDNS Proxy should not hang on addresses containing null bytes
Brian Carlstrom [Wed, 27 Apr 2011 18:47:41 +0000 (11:47 -0700)]
DNS Proxy should not hang on addresses containing null bytes

Two bugs here:

1.) The gethostbyaddr netd protocol was passing a binary address value
    but the arguments are expected to be strings not containing
    embedded nulls (or probably other special characters). This
    happened reliably with IPv6 addresses which contained nulls. It
    now expects an inet_ntop formatted address.

2.) Although the gethostbyaddr code detected something was wrong, it
    wasn't doing any proper error handling, leaving clients hanging
    waiting for a response. It now sends back an empty response so
    that clients can continue.

A corresponding change will be necesssary in bionic for #1 for DNS
proxying to work, but given the fix for #2, the existing bionic code
will fall back to performing its own gethostbyaddr call.

Bug: 4344448
Change-Id: I2d03bfec0093c67e8052717c0f499f8871bcfb85

13 years agoam 3a74e2f6: am c7d5ce4a: Ignore change "Set SO_PASSCRED on the uevent socket." in...
Conley Owens [Tue, 26 Apr 2011 23:04:01 +0000 (16:04 -0700)]
am 3a74e2f6: am c7d5ce4a: Ignore change "Set SO_PASSCRED on the uevent socket." in favor of change in internal change.

* commit '3a74e2f631209cf96c90b56e95c86d2bde1bb29e':
  Set SO_PASSCRED on the uevent socket. (needed for change I393c21da)

13 years agoam c7d5ce4a: Ignore change "Set SO_PASSCRED on the uevent socket." in favor of change...
Conley Owens [Tue, 26 Apr 2011 22:59:10 +0000 (15:59 -0700)]
am c7d5ce4a: Ignore change "Set SO_PASSCRED on the uevent socket." in favor of change in internal change.

* commit 'c7d5ce4af83acc83c4d871ee57d118d7d9a81188':
  Set SO_PASSCRED on the uevent socket. (needed for change I393c21da)

13 years agoIgnore change "Set SO_PASSCRED on the uevent socket." in favor of change
Conley Owens [Tue, 26 Apr 2011 22:27:59 +0000 (15:27 -0700)]
Ignore change "Set SO_PASSCRED on the uevent socket." in favor of change
in internal change.

Change-Id: I9f78c5e0e7c3cb4714ce8f908d1478dadf027d97

13 years agoMerge "Set SO_PASSCRED on the uevent socket. (needed for change I393c21da)"
Conley Owens [Tue, 26 Apr 2011 19:51:02 +0000 (12:51 -0700)]
Merge "Set SO_PASSCRED on the uevent socket. (needed for change I393c21da)"

13 years agoSet SO_PASSCRED on the uevent socket. (needed for change I393c21da)
Vernon Tang [Mon, 25 Apr 2011 03:31:34 +0000 (13:31 +1000)]
Set SO_PASSCRED on the uevent socket. (needed for change I393c21da)

Change-Id: I11767da938f6e8fd9b3b604218c26c3c8b8da881

13 years agoam adb408dc: am d5b10d36: netd: Enable the SO_PASSCRED socket option
Nick Kralevich [Tue, 19 Apr 2011 22:47:13 +0000 (15:47 -0700)]
am adb408dc: am d5b10d36: netd: Enable the SO_PASSCRED socket option

* commit 'adb408dc79639b5377c58d306484bc388062d195':
  netd: Enable the SO_PASSCRED socket option

13 years agoam d5b10d36: netd: Enable the SO_PASSCRED socket option
Nick Kralevich [Tue, 19 Apr 2011 22:38:41 +0000 (15:38 -0700)]
am d5b10d36: netd: Enable the SO_PASSCRED socket option

* commit 'd5b10d3633c6717b46763edf1a50d3e29a007592':
  netd: Enable the SO_PASSCRED socket option

13 years agonetd: Enable the SO_PASSCRED socket option
Nick Kralevich [Mon, 18 Apr 2011 22:54:13 +0000 (15:54 -0700)]
netd: Enable the SO_PASSCRED socket option

Ensure that sender credentials are available when we
receive a netlink message.

This is a manual cherry-pick of
79b579c92afc08ab12c0a5788d61f2dd2934836f

Change-Id: Ia7e742c2ab2fd4149454364a8c20ab0b719196b4

13 years agoam ea52906e: am 97f5eec2: am 79b579c9: netd: Enable the SO_PASSCRED socket option
Nick Kralevich [Tue, 19 Apr 2011 17:38:24 +0000 (10:38 -0700)]
am ea52906e: am 97f5eec2: am 79b579c9: netd: Enable the SO_PASSCRED socket option

* commit 'ea52906efcdcead1b2c7a12e0d5fa16374c9892c':
  netd: Enable the SO_PASSCRED socket option

13 years agoam 97f5eec2: am 79b579c9: netd: Enable the SO_PASSCRED socket option
Nick Kralevich [Tue, 19 Apr 2011 17:26:04 +0000 (10:26 -0700)]
am 97f5eec2: am 79b579c9: netd: Enable the SO_PASSCRED socket option

* commit '97f5eec2ac9e78b8388be52be1ea95b4462537ee':
  netd: Enable the SO_PASSCRED socket option

13 years agonetd: Enable the SO_PASSCRED socket option
Nick Kralevich [Mon, 18 Apr 2011 22:54:13 +0000 (15:54 -0700)]
netd: Enable the SO_PASSCRED socket option

Ensure that sender credentials are available when we
receive a netlink message.

Change-Id: I8a352573c7e49d99b4f2fdb2e4ce9abe58d4fc49

13 years agoam 79b579c9: netd: Enable the SO_PASSCRED socket option
Nick Kralevich [Mon, 18 Apr 2011 23:31:23 +0000 (16:31 -0700)]
am 79b579c9: netd: Enable the SO_PASSCRED socket option

* commit '79b579c92afc08ab12c0a5788d61f2dd2934836f':
  netd: Enable the SO_PASSCRED socket option

13 years agonetd: Enable the SO_PASSCRED socket option
Nick Kralevich [Mon, 18 Apr 2011 22:54:13 +0000 (15:54 -0700)]
netd: Enable the SO_PASSCRED socket option

Ensure that sender credentials are available when we
receive a netlink message.

Change-Id: I8a352573c7e49d99b4f2fdb2e4ce9abe58d4fc49

13 years agoReference count SocketClients.
Brad Fitzpatrick [Thu, 17 Mar 2011 22:53:22 +0000 (15:53 -0700)]
Reference count SocketClients.

Avoids a netd crash when the client closes its connection while
a DNS request is in-flight.

Depends on Icd7f5f03 in system/core.

Bug: 3438459
Change-Id: Ie6953196623b97ad2b90df951186fbfce84f8e4e

13 years agoSoftap: Add 'clients' command
Dmitry Shmidt [Tue, 8 Mar 2011 19:01:58 +0000 (11:01 -0800)]
Softap: Add 'clients' command

Change-Id: I3694a0b2b570e0925b7f807f133e6fa5d95c3ac2
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoam 0a60eb99: am 54a9575b: Merge "Add GetHostByAddrHandler to DnsProxyListener"
David Turner [Wed, 23 Feb 2011 05:36:22 +0000 (21:36 -0800)]
am 0a60eb99: am 54a9575b: Merge "Add GetHostByAddrHandler to DnsProxyListener"

* commit '0a60eb99298e54a3fca719f6695b1d7347dc849a':
  Add GetHostByAddrHandler to DnsProxyListener

13 years agoam 54a9575b: Merge "Add GetHostByAddrHandler to DnsProxyListener"
David Turner [Tue, 22 Feb 2011 22:47:33 +0000 (14:47 -0800)]
am 54a9575b: Merge "Add GetHostByAddrHandler to DnsProxyListener"

* commit '54a9575bb7a83ef859ebf4fa2cd610e65b6e9db2':
  Add GetHostByAddrHandler to DnsProxyListener

13 years agoMerge "Add GetHostByAddrHandler to DnsProxyListener"
David Turner [Thu, 17 Feb 2011 02:57:27 +0000 (18:57 -0800)]
Merge "Add GetHostByAddrHandler to DnsProxyListener"

13 years agoAdd GetHostByAddrHandler to DnsProxyListener
Mattias Falk [Tue, 15 Feb 2011 07:43:18 +0000 (08:43 +0100)]
Add GetHostByAddrHandler to DnsProxyListener

Added functionality to handle gethostbyaddr
in DnsProxyListener. The functionality is
used by getnameinfo. The patch is part of the
work to have one dns cache for all process in
the system.

Change-Id: Ia7609160d2bd1d3bbe2b79956bd208d137a8a9ee

13 years agoStop using netmask in the framework.
Robert Greenwalt [Tue, 1 Feb 2011 21:54:35 +0000 (13:54 -0800)]
Stop using netmask in the framework.

Use prefixlength instead.
bug:2542681

Change-Id: I4cc0d9a84a5b043da7f8cb19a42cc6aaae3f9584

13 years agoam 0787d3c9: am 2446b68f: Merge "Fix the DNS proxy again, for reals."
Brad Fitzpatrick [Wed, 26 Jan 2011 00:25:21 +0000 (16:25 -0800)]
am 0787d3c9: am 2446b68f: Merge "Fix the DNS proxy again, for reals."

* commit '0787d3c93bd52d8799bc1fbc4848e56d669337f7':
  Fix the DNS proxy again, for reals.

13 years agoam 8cee7841: am 41efab55: Merge "Fix DNS proxy."
Brad Fitzpatrick [Wed, 26 Jan 2011 00:25:20 +0000 (16:25 -0800)]
am 8cee7841: am 41efab55: Merge "Fix DNS proxy."

* commit '8cee7841d6aec9868dc94961e42277e332376f12':
  Fix DNS proxy.

13 years agoam e2e04304: am b9cab4ff: (-s ours) Merge "DNS proxy thread in netd."
Brad Fitzpatrick [Wed, 26 Jan 2011 00:25:18 +0000 (16:25 -0800)]
am e2e04304: am b9cab4ff: (-s ours) Merge "DNS proxy thread in netd."

* commit 'e2e043049e6c820a3ba03f89737c083796e238dc':
  DNS proxy thread in netd.

13 years agoam 2446b68f: Merge "Fix the DNS proxy again, for reals."
Brad Fitzpatrick [Wed, 26 Jan 2011 00:21:25 +0000 (16:21 -0800)]
am 2446b68f: Merge "Fix the DNS proxy again, for reals."

* commit '2446b68f8c0d72972f8f6ec7fa972d05a29c9f02':
  Fix the DNS proxy again, for reals.

13 years agoam 41efab55: Merge "Fix DNS proxy."
Brad Fitzpatrick [Wed, 26 Jan 2011 00:21:23 +0000 (16:21 -0800)]
am 41efab55: Merge "Fix DNS proxy."

* commit '41efab55c8ca0344d5d68d0a3ab5b1b43f905e3b':
  Fix DNS proxy.

13 years agoam b9cab4ff: (-s ours) Merge "DNS proxy thread in netd."
Brad Fitzpatrick [Wed, 26 Jan 2011 00:21:21 +0000 (16:21 -0800)]
am b9cab4ff: (-s ours) Merge "DNS proxy thread in netd."

* commit 'b9cab4ff6f6d6581574157662878d4c3fa28185e':
  DNS proxy thread in netd.

13 years agoMerge "Fix the DNS proxy again, for reals."
Brad Fitzpatrick [Tue, 25 Jan 2011 23:08:05 +0000 (15:08 -0800)]
Merge "Fix the DNS proxy again, for reals."

13 years agoMerge "Fix DNS proxy."
Brad Fitzpatrick [Tue, 25 Jan 2011 23:08:03 +0000 (15:08 -0800)]
Merge "Fix DNS proxy."

13 years agoMerge "DNS proxy thread in netd."
Brad Fitzpatrick [Tue, 25 Jan 2011 23:07:58 +0000 (15:07 -0800)]
Merge "DNS proxy thread in netd."

13 years agoRevert "Add NETLINK_ROUTE socket creation and event propagation"
Wink Saville [Sun, 9 Jan 2011 20:21:40 +0000 (12:21 -0800)]
Revert "Add NETLINK_ROUTE socket creation and event propagation"

This reverts commit f6a7ad814dca2f67907eaed2cc0609c684850969.

13 years agoFix the DNS proxy again, for reals.
Brad Fitzpatrick [Tue, 2 Nov 2010 18:48:20 +0000 (11:48 -0700)]
Fix the DNS proxy again, for reals.

me == the suck this morning

Bug: 3157030
Change-Id: Ib87ed047cd6999ee3d29b392acc7a559d9bb7349

13 years agoFix DNS proxy.
Brad Fitzpatrick [Tue, 2 Nov 2010 17:50:55 +0000 (10:50 -0700)]
Fix DNS proxy.

Don't assume writing 0 bytes to SocketClient will be successful.  (as
implemented in libsysutils right now, it returns an error...)

Bug: 3157030
Change-Id: I2b2cb8700cbf69be6dffa2e51d1c876c40675b9b

13 years agoDNS proxy thread in netd.
Brad Fitzpatrick [Wed, 27 Oct 2010 18:39:52 +0000 (11:39 -0700)]
DNS proxy thread in netd.

New thread in the netd process which listens on the
/dev/socket/dnsproxyd socket (group owned by 'inet', so only useable
by apps with the INTERNET permission), and does getaddrinfo requests
for other processes, caching in one place, rather than per-app.

Still remaining: proper caching based on DNS-requested lengths, upping
the cache size, getnameinfo, stats, flush, etc, etc.

Change-Id: I1d65af7d87876e508c718656bd81217cd961e20a

13 years agoAdd NETLINK_ROUTE socket creation and event propagation
Stan Chesnutt [Wed, 5 Jan 2011 19:47:37 +0000 (11:47 -0800)]
Add NETLINK_ROUTE socket creation and event propagation

Change-Id: I8cc8788661640600bceadeba8169e239bba98dec

13 years agoAdd missing include headers for compilation on x86 targets.
Olivier Bailly [Wed, 17 Nov 2010 19:45:07 +0000 (11:45 -0800)]
Add missing include headers for compilation on x86 targets.

Change-Id: I99f7b79bfb5b6305a0772f418a54ace50cac1bbe

13 years agoam f444b341: Merge aaf2e765 from open-source master
Jean-Baptiste Queru [Thu, 4 Nov 2010 17:57:44 +0000 (10:57 -0700)]
am f444b341: Merge aaf2e765 from open-source master

* commit 'f444b341768afcdb3f0934c068f3ead6bafdab78':
  Include <bluedroid/bluetooth.h> only if HAVE_BLUETOOTH is defined.

13 years agoMerge aaf2e765 from open-source master
Jean-Baptiste Queru [Thu, 4 Nov 2010 14:28:45 +0000 (07:28 -0700)]
Merge aaf2e765 from open-source master

Change-Id: I523c3e7def1d8dc1c9fa9308143bee952e73eeb9

13 years agoMerge "Include <bluedroid/bluetooth.h> only if HAVE_BLUETOOTH is defined."
Jean-Baptiste Queru [Wed, 3 Nov 2010 21:53:07 +0000 (14:53 -0700)]
Merge "Include <bluedroid/bluetooth.h> only if HAVE_BLUETOOTH is defined."

13 years agoFix the DNS proxy again, for reals.
Brad Fitzpatrick [Tue, 2 Nov 2010 18:48:20 +0000 (11:48 -0700)]
Fix the DNS proxy again, for reals.

me == the suck this morning

Bug: 3157030
Change-Id: Ib87ed047cd6999ee3d29b392acc7a559d9bb7349

13 years agoFix DNS proxy.
Brad Fitzpatrick [Tue, 2 Nov 2010 17:50:55 +0000 (10:50 -0700)]
Fix DNS proxy.

Don't assume writing 0 bytes to SocketClient will be successful.  (as
implemented in libsysutils right now, it returns an error...)

Bug: 3157030
Change-Id: I2b2cb8700cbf69be6dffa2e51d1c876c40675b9b

13 years agoDNS proxy thread in netd.
Brad Fitzpatrick [Wed, 27 Oct 2010 18:39:52 +0000 (11:39 -0700)]
DNS proxy thread in netd.

New thread in the netd process which listens on the
/dev/socket/dnsproxyd socket (group owned by 'inet', so only useable
by apps with the INTERNET permission), and does getaddrinfo requests
for other processes, caching in one place, rather than per-app.

Still remaining: proper caching based on DNS-requested lengths, upping
the cache size, getnameinfo, stats, flush, etc, etc.

Change-Id: I1d65af7d87876e508c718656bd81217cd961e20a

13 years agoRemove STOPSHIP comment
Paul Eastham [Wed, 13 Oct 2010 16:42:51 +0000 (09:42 -0700)]
Remove STOPSHIP comment

Change-Id: I2d42d6ddb16f88929b5edeeeb653feca8348e804

13 years agonetd: softap: Add sub-ioctl command support
jmzhu [Mon, 11 Oct 2010 23:47:05 +0000 (16:47 -0700)]
netd: softap: Add sub-ioctl command support

Change-Id: Ieb344fbb8853019e92a7385f7a190aa7451102dc
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoMerge "softap: Incapsulate command call"
Dmitry Shmidt [Thu, 23 Sep 2010 20:47:20 +0000 (13:47 -0700)]
Merge "softap: Incapsulate command call"

13 years agosoftap: Incapsulate command call
Dmitry Shmidt [Thu, 23 Sep 2010 00:31:07 +0000 (17:31 -0700)]
softap: Incapsulate command call

Change-Id: I9c123252b3b5fa8649876e7e9138927d25dd1812
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoUse ptsname_r instead of ptsname in logwrapper.
Brad Fitzpatrick [Mon, 20 Sep 2010 18:29:47 +0000 (11:29 -0700)]
Use ptsname_r instead of ptsname in logwrapper.

Also other misc suggestions and fixes from Markus' review.

Bug: 3017876
Change-Id: I503f0340c2d75afb6850e36c1586f7f495638036

13 years agoRe-sync netd and vold's logwrapper.c forks.
Brad Fitzpatrick [Mon, 20 Sep 2010 18:13:07 +0000 (11:13 -0700)]
Re-sync netd and vold's logwrapper.c forks.

Change-Id: Ie7ad47f0e9bfb862b92cd34070b79b6003549a16

13 years agoInclude <bluedroid/bluetooth.h> only if HAVE_BLUETOOTH is defined.
Rene Bolldorf [Tue, 17 Aug 2010 17:07:01 +0000 (19:07 +0200)]
Include <bluedroid/bluetooth.h> only if HAVE_BLUETOOTH is defined.

Change-Id: Ie679cf8b382c4d0abafc0f81ab28fa0762ff179c

14 years agoGet rid of warnings when compiled with -Wformat-security
Nick Kralevich [Fri, 14 May 2010 17:38:10 +0000 (10:38 -0700)]
Get rid of warnings when compiled with -Wformat-security

Change-Id: Iaed2edb7b43da5cb5cdd0bf641e45480633301fd

14 years agoMerge "netd: Switch throttling to use HTB instead of CBQ" into froyo
San Mehat [Fri, 30 Apr 2010 17:05:36 +0000 (10:05 -0700)]
Merge "netd: Switch throttling to use HTB instead of CBQ" into froyo

14 years agonetd: Switch throttling to use HTB instead of CBQ
San Mehat [Fri, 30 Apr 2010 13:19:07 +0000 (06:19 -0700)]
netd: Switch throttling to use HTB instead of CBQ

Change-Id: I5247c9b5264db374442d19d903a250413057f19d
Signed-off-by: San Mehat <san@google.com>
14 years agoFix fd leaks
Robert Greenwalt [Wed, 28 Apr 2010 23:05:04 +0000 (16:05 -0700)]
Fix fd leaks

When you open a file, you should remember to close it.
bug:2639464

Change-Id: I90d25dba2a262b620373270832eb3189616c720d

14 years agoMerge "softap: Add delay after driver start, return 0 if softap was started" into...
Dmitry Shmidt [Fri, 23 Apr 2010 20:08:23 +0000 (13:08 -0700)]
Merge "softap: Add delay after driver start, return 0 if softap was started" into froyo

14 years agosoftap: Add delay after driver start, return 0 if softap was started
Dmitry Shmidt [Fri, 23 Apr 2010 19:43:32 +0000 (12:43 -0700)]
softap: Add delay after driver start, return 0 if softap was started

Change-Id: I3e155cc7c118c21d5e66163bd678104d812465de
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
14 years agoFix the reading of /proc/net/dev
Robert Greenwalt [Fri, 23 Apr 2010 17:35:57 +0000 (10:35 -0700)]
Fix the reading of /proc/net/dev

When the bytes received counter gets too big it changes format from
name:  10 ...
name: 100 ...
name:1000 ...

The last one means sscanf can't parse a string and a long seperately - you
just get a string.  Fixed by detecting a char after ':', splitting the name
and reparsing the long.

bug:2612082
Change-Id: I84e41da1e38d24ea61f996ede9c87769abba5d22

14 years agoDon't make such noise when ppp0 is unavailable.
Robert Greenwalt [Wed, 14 Apr 2010 18:53:10 +0000 (11:53 -0700)]
Don't make such noise when ppp0 is unavailable.

On sholes ppp0 comes and goes with wifi and net availability.  We don't want our traffic
poller to have to care (and deal with race conditions) so just don't make so much noise
if we try to read the traffic data for a non-existing iface.

bug:2576057
Change-Id: I8c1d721e7afc288b08cffb79f8f52f6cab55c88b

14 years agonetd: Add ingress throttling
San Mehat [Fri, 9 Apr 2010 23:26:24 +0000 (16:26 -0700)]
netd: Add ingress throttling

Change-Id: Id86a0d0d0bdfa9bca36e7c7bce7e9290c8532082
Signed-off-by: San Mehat <san@google.com>
14 years agonetd: Plumb interface throttling
San Mehat [Wed, 7 Apr 2010 22:21:36 +0000 (15:21 -0700)]
netd: Plumb interface throttling

Change-Id: I9092a37b3d5f2bfa4f49ddc473d0a5490abaae8f
Signed-off-by: San Mehat <san@google.com>
14 years agoFix network byte-count reading.
Robert Greenwalt [Sat, 3 Apr 2010 00:40:08 +0000 (17:40 -0700)]
Fix network byte-count reading.

Some networks iface names are too long to fit in a 6-char string.

bug:2561759
Change-Id: I571c9871db424d349bc47b4d15c6015a33be6f2a

14 years agonetd: Add skelaton support for throttling
San Mehat [Thu, 1 Apr 2010 15:31:37 +0000 (08:31 -0700)]
netd: Add skelaton support for throttling

Change-Id: I361f3c4ac30f7bb6efe4ed703405f0e843b075b4
Signed-off-by: San Mehat <san@google.com>
14 years agoFix bug in NATing code.
Robert Greenwalt [Thu, 25 Mar 2010 21:54:45 +0000 (14:54 -0700)]
Fix bug in NATing code.

Silly errors in refcount logic did the wrong thing.

Change-Id: I2cfc208615258397501450717cfcb7eb0386c9d4

14 years agoAdd support for multiple dhcp ranges.
Robert Greenwalt [Wed, 24 Mar 2010 23:32:55 +0000 (16:32 -0700)]
Add support for multiple dhcp ranges.

We need multiple dhcp ranges to support dhcp on different interfaces.

bug:2533491
Change-Id: I3b568e81c048c6aff1a752ac4a81669034104413

14 years agoMake NATing add/remove iptable rules as needed
Robert Greenwalt [Wed, 24 Mar 2010 22:43:00 +0000 (15:43 -0700)]
Make NATing add/remove iptable rules as needed

It was flushing on every unNAT, but really you want to remove just those rules.  We'll
Flush when we get to 0 NATs.

bug: 2542176
Change-Id: Ia70580191b1aed754689864044de122234346011

14 years agosoftap: Add delay after startap, set and stopap calls
Dmitry Shmidt [Thu, 18 Mar 2010 20:06:47 +0000 (13:06 -0700)]
softap: Add delay after startap, set and stopap calls

Change-Id: I9b34d610b3576764324efbf78bb55322d1067378
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
14 years agonetd: Use OpenSSL APIs for WPA-PSK calculation
Kenny Root [Mon, 15 Mar 2010 21:26:36 +0000 (14:26 -0700)]
netd: Use OpenSSL APIs for WPA-PSK calculation

Change-Id: Ibe2040a2ede58fcfad5b27cdb01a107fbf2c9f3d

14 years agonetd: softap: Add softap start / stop driver commands
Dmitry Shmidt [Fri, 12 Mar 2010 22:16:46 +0000 (14:16 -0800)]
netd: softap: Add softap start / stop driver commands

Change-Id: I2081e4943b6b93109288e8d764ce25a55f3b6198
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
14 years agonetd: softap: Fix driver API for SoftAP
Dmitry Shmidt [Fri, 12 Mar 2010 21:04:09 +0000 (13:04 -0800)]
netd: softap: Fix driver API for SoftAP

Change-Id: I5e17b2369d5ef34ea29b0c1b0df1d4977ff109ce
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
14 years agonetd: softap: Add FW reload processing
Dmitry Shmidt [Fri, 12 Mar 2010 18:01:58 +0000 (10:01 -0800)]
netd: softap: Add FW reload processing

Change-Id: I731c2e390187c0fa5f69779cd25d8f2388ee511e
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
14 years agonetd: softap: Add passphrase to hex conversion
Dmitry Shmidt [Tue, 9 Mar 2010 23:46:34 +0000 (15:46 -0800)]
netd: softap: Add passphrase to hex conversion

Change-Id: Ia9b141cb436336deec6d94af701e6d807baa2f99
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
14 years agonetd: softap: Change "set" to use separate arguments
Dmitry Shmidt [Tue, 9 Mar 2010 18:57:59 +0000 (10:57 -0800)]
netd: softap: Change "set" to use separate arguments

Change-Id: Id5f2adb41c671f2978fa3fe939b1a3b15a537165
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
14 years agoAdd an empty CleanSpec.mk
Jean-Baptiste Queru [Tue, 9 Mar 2010 02:05:25 +0000 (18:05 -0800)]
Add an empty CleanSpec.mk

Change-Id: Ic22ebb3ef1b4f4a3b44fe1d7975bd851c1fc12bd

14 years agoMerge "softap: Add basic functionality directly through WEXT"
Irfan Sheriff [Wed, 3 Mar 2010 23:35:58 +0000 (15:35 -0800)]
Merge "softap: Add basic functionality directly through WEXT"

14 years agosoftap: Add basic functionality directly through WEXT
Dmitry Shmidt [Wed, 3 Mar 2010 21:14:30 +0000 (13:14 -0800)]
softap: Add basic functionality directly through WEXT

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
14 years agoFix typo in UsbController::isRNDISStarted()
Mike Lockwood [Wed, 3 Mar 2010 19:48:59 +0000 (14:48 -0500)]
Fix typo in UsbController::isRNDISStarted()

Signed-off-by: Mike Lockwood <lockwood@android.com>
14 years agoAdd enable/disable control of USB networking
Robert Greenwalt [Thu, 18 Feb 2010 18:54:08 +0000 (10:54 -0800)]
Add enable/disable control of USB networking

Also fix some errors in the interface control code (if we pass out all flags like so:
[up broadcast multicast]
we should probably accept that back)

14 years agoAdd enable/disable control of USB networking
Robert Greenwalt [Thu, 18 Feb 2010 18:54:08 +0000 (10:54 -0800)]
Add enable/disable control of USB networking

14 years agoMerge "Check total string length of supplied DNS servers"
Kenny Root [Thu, 18 Feb 2010 18:11:50 +0000 (10:11 -0800)]
Merge "Check total string length of supplied DNS servers"

14 years agoCheck total string length of supplied DNS servers
Kenny Root [Thu, 18 Feb 2010 17:59:55 +0000 (09:59 -0800)]
Check total string length of supplied DNS servers

Make sure the number of DNS servers doesn't grow past what we were
planning on handling in our string buffer.

Change-Id: Ic2d60b0a4363c806d4c3a7dfafa62930c4f5ca1f

14 years agoHook netlink interface notification up to fwk.
Robert Greenwalt [Thu, 18 Feb 2010 01:42:37 +0000 (17:42 -0800)]
Hook netlink interface notification up to fwk.

The java api was there to get callbacks but the middle piece was missing.
Also has one const defined for USB control that is part of a seperate change, but no harm.

14 years agonetd: Add Softap controller skeleton functions
Dmitry Shmidt [Wed, 10 Feb 2010 19:10:39 +0000 (11:10 -0800)]
netd: Add Softap controller skeleton functions

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
14 years agoSilence PPPDs noisy logs.
Robert Greenwalt [Thu, 4 Feb 2010 23:25:22 +0000 (15:25 -0800)]
Silence PPPDs noisy logs.

14 years agonetd: Don't print error on unknown Netlink event
San Mehat [Wed, 3 Feb 2010 16:51:18 +0000 (08:51 -0800)]
netd: Don't print error on unknown Netlink event

Signed-off-by: San Mehat <san@google.com>