OSDN Git Service

android-x86/system-netd.git
12 years agoMerge "remove dependency on utils/List.h"
Mathias Agopian [Tue, 6 Mar 2012 02:29:42 +0000 (18:29 -0800)]
Merge "remove dependency on utils/List.h"

12 years agoremove dependency on utils/List.h
Mathias Agopian [Tue, 6 Mar 2012 01:05:02 +0000 (17:05 -0800)]
remove dependency on utils/List.h

Change-Id: I45c7e2cf9fe07f65259af6fa22d719259386912c

12 years agoam 9c2d6591: am c91e3d47: Reconcile with ics-mr1-release
The Android Open Source Project [Sat, 3 Mar 2012 00:48:33 +0000 (16:48 -0800)]
am 9c2d6591: am c91e3d47: Reconcile with ics-mr1-release

* commit '9c2d659130f57082adafa9c0a86d308cb4fff6e7':

12 years agoam c91e3d47: Reconcile with ics-mr1-release
The Android Open Source Project [Sat, 3 Mar 2012 00:44:17 +0000 (16:44 -0800)]
am c91e3d47: Reconcile with ics-mr1-release

* commit 'c91e3d476a8002fc6e8f994152be5dc4b3b85489':

12 years agoReconcile with ics-mr1-release
The Android Open Source Project [Sat, 3 Mar 2012 00:41:44 +0000 (16:41 -0800)]
Reconcile with ics-mr1-release

Change-Id: I94123eabf7bde1c98440858acbddacca8f91c4bb

12 years agoam e03c41b5: am 4d00f912: Reconcile with ics-mr1-release
The Android Open Source Project [Sat, 3 Mar 2012 00:37:53 +0000 (16:37 -0800)]
am e03c41b5: am 4d00f912: Reconcile with ics-mr1-release

* commit 'e03c41b50bd4bcfdf8a1c9f965200ab1a783b1d6':

12 years agoam 4d00f912: Reconcile with ics-mr1-release
The Android Open Source Project [Sat, 3 Mar 2012 00:35:25 +0000 (16:35 -0800)]
am 4d00f912: Reconcile with ics-mr1-release

* commit '4d00f91201adc92d2d7fc56322f264db2fa7c816':

12 years agoReconcile with ics-mr1-release
The Android Open Source Project [Sat, 3 Mar 2012 00:33:57 +0000 (16:33 -0800)]
Reconcile with ics-mr1-release

Change-Id: I939f27b0ec63aa664bd606bd6ac7af4433d67c18

12 years agomerge in ics-mr1-release history after reset to ics-mr1
The Android Automerger [Fri, 2 Mar 2012 19:52:34 +0000 (11:52 -0800)]
merge in ics-mr1-release history after reset to ics-mr1

12 years agoam b7aeeb6c: am 500e77d5: am 3c20787d: Increase the valid name of the iface to IFNAMSIZ
Jaime A Lopez-Sollano [Thu, 1 Mar 2012 17:08:30 +0000 (09:08 -0800)]
am b7aeeb6c: am 500e77d5: am 3c20787d: Increase the valid name of the iface to IFNAMSIZ

* commit 'b7aeeb6cf2d473639b1a495361d888cbf52ab6c5':

12 years agoresolved conflicts for merge of 924e6e4d to master
Robert Greenwalt [Wed, 29 Feb 2012 22:06:33 +0000 (14:06 -0800)]
resolved conflicts for merge of 924e6e4d to master

Change-Id: I98212c9d7004a9ae38e463036ae6ca97b9569dda

12 years agoam 500e77d5: am 3c20787d: Increase the valid name of the iface to IFNAMSIZ
Jaime A Lopez-Sollano [Wed, 29 Feb 2012 20:17:58 +0000 (12:17 -0800)]
am 500e77d5: am 3c20787d: Increase the valid name of the iface to IFNAMSIZ

* commit '500e77d5f596b9ee488ff2cf4309d81525c0d6fd':

12 years agoam 7de67315: am 3c20787d: Increase the valid name of the iface to IFNAMSIZ
Jaime A Lopez-Sollano [Wed, 29 Feb 2012 20:16:40 +0000 (12:16 -0800)]
am 7de67315: am 3c20787d: Increase the valid name of the iface to IFNAMSIZ

* commit '7de673157ed86b0ba4705a071380a103c1d1841e':
  Increase the valid name of the iface to IFNAMSIZ

12 years agoam 3c20787d: Increase the valid name of the iface to IFNAMSIZ
Jaime A Lopez-Sollano [Wed, 29 Feb 2012 20:14:17 +0000 (12:14 -0800)]
am 3c20787d: Increase the valid name of the iface to IFNAMSIZ

* commit '3c20787d7935c2016e8e3cc49d8f15647c12c41c':
  Increase the valid name of the iface to IFNAMSIZ

12 years agoam 3c20787d: Increase the valid name of the iface to IFNAMSIZ
Jaime A Lopez-Sollano [Wed, 29 Feb 2012 20:13:49 +0000 (12:13 -0800)]
am 3c20787d: Increase the valid name of the iface to IFNAMSIZ

* commit '3c20787d7935c2016e8e3cc49d8f15647c12c41c':
  Increase the valid name of the iface to IFNAMSIZ

12 years agoIncrease the valid name of the iface to IFNAMSIZ
Jaime A Lopez-Sollano [Thu, 12 Jan 2012 00:29:28 +0000 (16:29 -0800)]
Increase the valid name of the iface to IFNAMSIZ

Define MAX_IFACE_LENGTH as IFNAMSIZ instead of 10, to
prevent netd from treating an interface name 'rmnet_sdio0'
as invalid.
Also fix an off-by-one error.

bug:5675718
Change-Id: I2b6ba823c89941031e5898b24dab388cd9c2dae8

12 years agoMerge "netd: softap: Add ieee80211n=1 parameter for hotspot"
Dmitry Shmidt [Wed, 29 Feb 2012 18:00:23 +0000 (10:00 -0800)]
Merge "netd: softap: Add ieee80211n=1 parameter for hotspot"

12 years agonetd: softap: Add ieee80211n=1 parameter for hotspot
Dmitry Shmidt [Tue, 28 Feb 2012 20:41:45 +0000 (12:41 -0800)]
netd: softap: Add ieee80211n=1 parameter for hotspot

Change-Id: I73d862494c186a08066d8e3478667055bfc831a1
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agoBandwidthController: fix format string bugs
Nick Kralevich [Thu, 23 Feb 2012 21:04:26 +0000 (13:04 -0800)]
BandwidthController: fix format string bugs

In 876666947664c718a8d0cae9bbddb06cc91f912c, a new %s
was added to ALERT_IPT_TEMPLATE. Not all users of this string
were updated.

This change modifies ALERT_IPT_TEMPLATE to be a #define, which
allows gcc's format string detection work.

Add -Werror=format to error out on any string format warning.

Testing: Code compiles. I don't know how to test this change
properly.

Bug: 5948299
Change-Id: I0ec307972e6bf50abd8ba099166c22069a6c6580

12 years agonetd: softap: Add wmm_enabled=1 option
Dmitry Shmidt [Mon, 13 Feb 2012 18:29:23 +0000 (10:29 -0800)]
netd: softap: Add wmm_enabled=1 option

Change-Id: I3742e1130e3d9e3074a67f2e1bdd13ef11bb77dc
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agoMerge "Increase the valid name of the iface to IFNAMSIZ"
Robert Greenwalt [Wed, 1 Feb 2012 18:16:07 +0000 (10:16 -0800)]
Merge "Increase the valid name of the iface to IFNAMSIZ"

12 years agoam c5c68d7b: am ad8126d0: Reconcile with ics-mr1-release
The Android Open Source Project [Wed, 1 Feb 2012 18:05:46 +0000 (10:05 -0800)]
am c5c68d7b: am ad8126d0: Reconcile with ics-mr1-release

* commit 'c5c68d7b9b92b0f7f151fec20359ab75ea5fbc34':

12 years agoam ad8126d0: Reconcile with ics-mr1-release
The Android Open Source Project [Wed, 1 Feb 2012 18:01:09 +0000 (10:01 -0800)]
am ad8126d0: Reconcile with ics-mr1-release

* commit 'ad8126d0199af924f8036a81297e1f67c3bba7ab':

12 years agoReconcile with ics-mr1-release
The Android Open Source Project [Wed, 1 Feb 2012 16:50:53 +0000 (08:50 -0800)]
Reconcile with ics-mr1-release

Change-Id: Ica795e32aa94c9ea21b4a4f2acd84a9979c59c09

12 years agoIncrease the valid name of the iface to IFNAMSIZ
Jaime A Lopez-Sollano [Thu, 12 Jan 2012 00:29:28 +0000 (16:29 -0800)]
Increase the valid name of the iface to IFNAMSIZ

Define MAX_IFACE_LENGTH as IFNAMSIZ instead of 10, to
prevent netd from treating an interface name 'rmnet_sdio0'
as invalid.
Also fix an off-by-one error.

Change-Id: If6b2b27d2da6eb72f01c090cbe4f7dc2b9c296ae

12 years agoMerge "Keep better tabs on secondary tables."
Robert Greenwalt [Wed, 1 Feb 2012 00:39:56 +0000 (16:39 -0800)]
Merge "Keep better tabs on secondary tables."

12 years agoKeep better tabs on secondary tables.
Robert Greenwalt [Tue, 31 Jan 2012 20:46:45 +0000 (12:46 -0800)]
Keep better tabs on secondary tables.

We had some places (NatController) where routes were being set
but not accounted for in the number-of-routes talley so we
could end up thinking the table was empty and not clean up
after ourselves properly.

Also consolidated constants.

bug:5917475
Change-Id: I98a41d433e1d4b4ca6692fb2328e2c9afc828145

12 years agoam a201914b: Reconcile with ics-mr1-release
The Android Open Source Project [Fri, 20 Jan 2012 23:52:24 +0000 (15:52 -0800)]
am a201914b: Reconcile with ics-mr1-release

* commit 'a201914b3b2f6910b4ce4d58a4f170d9ebaeb174':

12 years agoReconcile with ics-mr1-release
The Android Open Source Project [Thu, 19 Jan 2012 21:07:15 +0000 (13:07 -0800)]
Reconcile with ics-mr1-release

Change-Id: I2e12ef9428b2f10e7cc87199edfa090cb9c7167e

12 years agonetd: Rename LOGI/LOGE to ALOGI/ALOGE
JP Abgrall [Thu, 19 Jan 2012 19:44:24 +0000 (11:44 -0800)]
netd: Rename LOGI/LOGE to ALOGI/ALOGE

The merge from ics-mr1 branch pulled in some oldschool LOGE/LOGI calls.

Change-Id: I3c452198375c4cdce085307e844f1d6aa491225b

12 years agoam b210b180: am 4ab46857: Add back hook for inserting OEM specific iptables rules.
Kazuhiro Ondo [Thu, 19 Jan 2012 18:54:39 +0000 (10:54 -0800)]
am b210b180: am 4ab46857: Add back hook for inserting OEM specific iptables rules.

* commit 'b210b1806c740bf66eb04eb8e8d8ee75c01652dd':
  Add back hook for inserting OEM specific iptables rules.

12 years agomerge in ics-mr1-release history after reset to ics-mr1
The Android Automerger [Thu, 19 Jan 2012 05:18:48 +0000 (21:18 -0800)]
merge in ics-mr1-release history after reset to ics-mr1

12 years agoam 4ab46857: Add back hook for inserting OEM specific iptables rules.
Kazuhiro Ondo [Thu, 19 Jan 2012 00:10:21 +0000 (16:10 -0800)]
am 4ab46857: Add back hook for inserting OEM specific iptables rules.

* commit '4ab468577647d1ee73810b89d2287eaa5546fecb':
  Add back hook for inserting OEM specific iptables rules.

12 years agoAdd back hook for inserting OEM specific iptables rules.
Kazuhiro Ondo [Thu, 12 Jan 2012 22:15:06 +0000 (16:15 -0600)]
Add back hook for inserting OEM specific iptables rules.

The functionality was lost during merge in ICS branch.
This patch is adding back OEM iptables hook in netd.

Bug:5862460
Change-Id: I9444b8c53e8b84fea2002c2c1d9ba42e45ae5f0c

12 years agoUse <resolv_iface.h> instead of <resolv.h>
David 'Digit' Turner [Fri, 13 Jan 2012 12:43:43 +0000 (13:43 +0100)]
Use <resolv_iface.h> instead of <resolv.h>

The declarations for _resolv_set_default_iface() and others were
initially added to a public C library header (<resolv.h>). This was a
mistake and they have been moved to a private header
(bionic/libc/private/resolv_iface.h)

This patch updates netd to use the correct private header.

Change-Id: I186390ea3675685b4e0dd5b8a099bd21911f059e

12 years agoRename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
Steve Block [Fri, 6 Jan 2012 19:18:11 +0000 (19:18 +0000)]
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)  DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: I8ab66debe4d0c3857a4b80f6f7b6925a352cda87

12 years agoRename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
Steve Block [Thu, 5 Jan 2012 23:21:51 +0000 (23:21 +0000)]
Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF)  DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: Ic9a12b3bc322d1fa60de50725b5ca18341d64b91

12 years agoRename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
Steve Block [Wed, 4 Jan 2012 20:05:11 +0000 (20:05 +0000)]
Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)  DO NOT MERGE

See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: I61f544fc5b362863886cadceb37c9840e1d48e9b

12 years agoRename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
Steve Block [Tue, 20 Dec 2011 16:22:42 +0000 (16:22 +0000)]
Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)  DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I85b946663d5a0e7606140282bf758c27b8c6f68f

12 years agoam b6331c31: Reconcile with ics-mr1-release
The Android Open Source Project [Thu, 15 Dec 2011 00:08:44 +0000 (16:08 -0800)]
am b6331c31: Reconcile with ics-mr1-release

* commit 'b6331c31fede2d6a898892bdf9e9b34618da9756':
  netd: fix argument interpretation bug

12 years agoReconcile with ics-mr1-release
The Android Open Source Project [Thu, 15 Dec 2011 00:05:55 +0000 (16:05 -0800)]
Reconcile with ics-mr1-release

Change-Id: I95c0b924756d815c89e70c088b6e8003a54226f8

12 years agonetd: fix argument interpretation bug
JP Abgrall [Wed, 14 Dec 2011 23:20:59 +0000 (15:20 -0800)]
netd: fix argument interpretation bug

While working around the logwrap() issue, it was replaced with system()
which could lead to various commands getting misinterpreted.

We now use a system() equivalent that doesn't use "sh -c".

Bug:5758556
Change-Id: I2599b526ac34bcfca18d05261286d902d547efda

12 years agoam 9e5e0ce6: netd: fix argument interpretation bug
JP Abgrall [Wed, 14 Dec 2011 23:32:55 +0000 (15:32 -0800)]
am 9e5e0ce6: netd: fix argument interpretation bug

* commit '9e5e0ce62e88ddf9a09798eda51b0c270d354c8e':
  netd: fix argument interpretation bug

12 years agonetd: fix argument interpretation bug
JP Abgrall [Wed, 14 Dec 2011 23:20:59 +0000 (15:20 -0800)]
netd: fix argument interpretation bug

While working around the logwrap() issue, it was replaced with system()
which could lead to various commands getting misinterpreted.

We now use a system() equivalent that doesn't use "sh -c".

Bug:5758556
Change-Id: I2599b526ac34bcfca18d05261286d902d547efda

12 years agoAllow additional interface flags.
Jeff Sharkey [Thu, 1 Dec 2011 23:25:28 +0000 (15:25 -0800)]
Allow additional interface flags.

Bug: 5686458
Change-Id: I9c5147446636d32bb3a420a05199870cca5f013d

12 years agoRemove square brackets from interface flags.
Jeff Sharkey [Wed, 30 Nov 2011 02:38:14 +0000 (18:38 -0800)]
Remove square brackets from interface flags.

All trailing arguments are treated as now treated as flags, instead
of mixing argument formats.

Change-Id: Iab80ed47ce2c8a1e7bc0fc5a46d391638fe282c8

12 years agoam 063af322: Fix some syntax issues with IP command.
Robert Greenwalt [Wed, 23 Nov 2011 20:16:19 +0000 (12:16 -0800)]
am 063af322: Fix some syntax issues with IP command.

* commit '063af322b48ab1bb0c3e09eb0b64915ba568275b':
  Fix some syntax issues with IP command.

12 years agoFix some syntax issues with IP command.
Robert Greenwalt [Fri, 18 Nov 2011 23:32:13 +0000 (15:32 -0800)]
Fix some syntax issues with IP command.

Was not building secondary tables properly.  Also IPv6 host routes
were failing.

bug:5615697
Change-Id: I0d5ad2ed7d13e4d5bd8c2f8ce15fc0ccb36a4690

12 years agonetd: BandwidthController: return extra info on gettetherstats failure
JP Abgrall [Sat, 12 Nov 2011 04:36:16 +0000 (20:36 -0800)]
netd: BandwidthController: return extra info on gettetherstats failure

Use the error message string to report the raw parsed data in case of
failure.

Bug:5543131
Change-Id: If9f3bcea09fd3ab8a506955d8153b3430bfd239c

12 years agoam fc97b82e: Start using IP tool for advanced routing.
Robert Greenwalt [Sat, 5 Nov 2011 19:33:44 +0000 (19:33 +0000)]
am fc97b82e: Start using IP tool for advanced routing.

* commit 'fc97b82e02979f246d56a4bfd60e4aab8686d3f6':
  Start using IP tool for advanced routing.

12 years agoStart using IP tool for advanced routing.
Robert Greenwalt [Wed, 2 Nov 2011 23:48:36 +0000 (16:48 -0700)]
Start using IP tool for advanced routing.

bug:5495862
bug:5396842
Change-Id: I51f21060947f57e63b18c4d35e9d49fac488d48a

12 years agoam f7bf29c8: When un-natting try to do all we can
Robert Greenwalt [Wed, 2 Nov 2011 21:32:24 +0000 (21:32 +0000)]
am f7bf29c8: When un-natting try to do all we can

* commit 'f7bf29c8a37d65e132a4dceb7c5a4200ed5c3d79':
  When un-natting try to do all we can

12 years agoWhen un-natting try to do all we can
Robert Greenwalt [Wed, 2 Nov 2011 05:07:28 +0000 (22:07 -0700)]
When un-natting try to do all we can

Regardless of errors we should try to do as much as possible.  Sometimes
some steps may fail if interfaces are taken down before we can un-nat them.

bug:5536516
Change-Id: I9c9b0123198dba890565e0a6e4e15add16b369c2

12 years agoam 54b75b4e: Use CCMP for WPA2 mode
Irfan Sheriff [Wed, 26 Oct 2011 15:22:47 +0000 (15:22 +0000)]
am 54b75b4e: Use CCMP for WPA2 mode

* commit '54b75b4e772ac77df141ab077be074bc1c098987':
  Use CCMP for WPA2 mode

12 years agoUse CCMP for WPA2 mode
Irfan Sheriff [Wed, 26 Oct 2011 03:37:18 +0000 (20:37 -0700)]
Use CCMP for WPA2 mode

TKIP+CCMP for WPA and the secure CCMP for WPA2

Bug:5515097
Change-Id: I877d1f4075c3df83149aca23b59c285d2fe093e1

12 years agoRename LOGV(_IF) to ALOGV(_IF) DO NOT MERGE
Steve Block [Thu, 20 Oct 2011 10:55:56 +0000 (11:55 +0100)]
Rename LOGV(_IF) to ALOGV(_IF)  DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: Iaf07eecf106fda89c464723661976f4570638558

12 years agoRename LOG() to ALOG() DO NOT MERGE
Steve Block [Wed, 12 Oct 2011 16:28:37 +0000 (17:28 +0100)]
Rename LOG() to ALOG()  DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/141576

Bug: 5449033
Change-Id: I049afb3bf14d5eb5c3cf8dc073113a4854f8ec06

12 years agonetd: bandwidth: tethering global alert support
JP Abgrall [Fri, 7 Oct 2011 23:28:54 +0000 (16:28 -0700)]
netd: bandwidth: tethering global alert support

Now, when nat is enabled/disabled it will let the bandwidthcontroller
know that it might need to add/remove the matching global alert into
the tethering rules in the FORWARD chain of iptables.

Bug: 5336638
Change-Id: I1843f3f6601f371537f754a31db792e054b36a1d

12 years agoAdd support to disable/enable ipv6
repo sync [Thu, 29 Sep 2011 23:10:42 +0000 (16:10 -0700)]
Add support to disable/enable ipv6

Bug: 5388757
Change-Id: I0506254948477cbff05603faed625cc73d94d777

12 years agoMove the code to delete IP addresses to ifc_utils.
Lorenzo Colitti [Tue, 27 Sep 2011 18:10:46 +0000 (11:10 -0700)]
Move the code to delete IP addresses to ifc_utils.

Change-Id: I04c8de503229d1dce6bd08c286b7017eaea11039

12 years agonetd: BandwidthController: support reading out tethering stats
JP Abgrall [Sun, 18 Sep 2011 19:57:32 +0000 (12:57 -0700)]
netd: BandwidthController: support reading out tethering stats

* Add
  ndc bandwidth gettetherstats <ifaceIn> <ifaceOut>
which returns
  221  ifaceIn ifaceOut rx_bytes rx_packets tx_bytes tx_packets
If the iface pair is not found it will fail.

221 is the new response code for TetheringStatsResult.
It gets the stats by looking at the iptables FORWARD chain's counters.

* Fixed return handling after some of the responses.
  - no need for errorno
  - after ResponseCode >= 200, don't return another.

* Correctly initialize the alert values on "bandwidth enable"

Bug: 5244846,5230066
Change-Id: I81c941441525fa4055ae270d5cad05e6c42b8f72

12 years agoMerge "Netd comand to change IPv6 privacy extensions"
Irfan Sheriff [Wed, 14 Sep 2011 22:03:21 +0000 (15:03 -0700)]
Merge "Netd comand to change IPv6 privacy extensions"

12 years agoNetd comand to change IPv6 privacy extensions
Irfan Sheriff [Wed, 14 Sep 2011 19:32:47 +0000 (12:32 -0700)]
Netd comand to change IPv6 privacy extensions

Bug: 3360737
Change-Id: Ifa13c425c6168acdd01600d49c1fb52288c60d3c

12 years agonetd: BandwidthController: exclude loopback in all alert rules.
JP Abgrall [Thu, 8 Sep 2011 20:44:10 +0000 (13:44 -0700)]
netd: BandwidthController: exclude loopback in all alert rules.

Have the alerts explicitly request "not loopback".

Change-Id: I7a569292e630c2b8ec76489643741f53ab85b84e

12 years agoAvoid setting prefix length for 0.0.0.0 address
Irfan Sheriff [Sat, 3 Sep 2011 00:34:12 +0000 (17:34 -0700)]
Avoid setting prefix length for 0.0.0.0 address

The ioctl to set netmask fails when the interface address is 0.0.0.0.
The kernel always keeps the netmask as 0 when the address is 0.0.0.0.
Avoid making a call to prefix length when address is 0.0.0.0

Bug: 5255172
Change-Id: Id32f7823b2230fb9ac7cd45b0df1951f11338112

12 years agonetd: all: use system() instead of logwrap() for now.
JP Abgrall [Thu, 11 Aug 2011 22:34:49 +0000 (15:34 -0700)]
netd: all: use system() instead of logwrap() for now.

The logwrapper uses a blocking read() which does not always
correctly detect when the child process at the other end is gone.
This is a quick workaround for http://b/5144246
A cleaner logwrapper parent() will follow.

Add support for BandwidthController() to use either system() or
logwrap(). It looks at "persist.bandwidth.uselogwrap" to be 0 or 1.

Change-Id: I2d17732214f1a7fef6838eee05d827695b707ab0
Signed-off-by: JP Abgrall <jpa@google.com>
12 years agoam e98a5816: am 6e4d5db1: Fix two error-case unwinders.
Robert Greenwalt [Thu, 4 Aug 2011 01:16:41 +0000 (18:16 -0700)]
am e98a5816: am 6e4d5db1: Fix two error-case unwinders.

* commit 'e98a581641a233fd048bf76f68650b627ef546e5':
  Fix two error-case unwinders.

12 years agoam 6e4d5db1: Fix two error-case unwinders.
Robert Greenwalt [Thu, 4 Aug 2011 00:14:40 +0000 (17:14 -0700)]
am 6e4d5db1: Fix two error-case unwinders.

* commit '6e4d5db1b11f808bb4bdcc8dd45a7158c6c88515':
  Fix two error-case unwinders.

12 years agoFix two error-case unwinders.
Robert Greenwalt [Wed, 3 Aug 2011 23:51:30 +0000 (16:51 -0700)]
Fix two error-case unwinders.

Noticed by moto, I missed to calls to actually do the unwinding.

Change-Id: Ie4da4979a3ad0eedcb6d468fecdff6614b1819bd

12 years agoam 69a5b777: am ddb9f6eb: Add DROP rule for INVALID packets.
Robert Greenwalt [Tue, 2 Aug 2011 20:28:54 +0000 (13:28 -0700)]
am 69a5b777: am ddb9f6eb: Add DROP rule for INVALID packets.

* commit '69a5b7777f67f6d5ad9dbd33758332c7b0104613':
  Add DROP rule for INVALID packets.

12 years agoam ddb9f6eb: Add DROP rule for INVALID packets.
Robert Greenwalt [Tue, 2 Aug 2011 20:08:17 +0000 (13:08 -0700)]
am ddb9f6eb: Add DROP rule for INVALID packets.

* commit 'ddb9f6eb8d8c35f46c1e3da68f375b85903e85c9':
  Add DROP rule for INVALID packets.

12 years agoAdd DROP rule for INVALID packets.
Robert Greenwalt [Tue, 2 Aug 2011 20:00:11 +0000 (13:00 -0700)]
Add DROP rule for INVALID packets.

bug:5094583
Change-Id: Ib942c557e7f2694b6ee18cc6562df597165894ce

12 years agoMerge "softap: Increase delay after driver start to 800 ms (from 400)"
Dmitry Shmidt [Mon, 1 Aug 2011 23:03:11 +0000 (16:03 -0700)]
Merge "softap: Increase delay after driver start to 800 ms (from 400)"

12 years agosoftap: Increase delay after driver start to 800 ms (from 400)
Dmitry Shmidt [Mon, 1 Aug 2011 22:33:18 +0000 (15:33 -0700)]
softap: Increase delay after driver start to 800 ms (from 400)

Workaround to avoid __nl80211_set_channel() to fail

Change-Id: I710f18c66cff66413f7133d65b2adcf53d67a8e7
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agoam 51c1ce04: (-s ours) am 4309f87d: DO NOT MERGE: Update OEM iptable hooks and ip fwd
Wink Saville [Fri, 29 Jul 2011 23:56:18 +0000 (16:56 -0700)]
am 51c1ce04: (-s ours) am 4309f87d: DO NOT MERGE: Update OEM iptable hooks and ip fwd

* commit '51c1ce04e8b16f29aa8d9727e65263d8f590c543':
  DO NOT MERGE: Update OEM iptable hooks and ip fwd

12 years agoam 4309f87d: DO NOT MERGE: Update OEM iptable hooks and ip fwd
Wink Saville [Fri, 29 Jul 2011 23:54:53 +0000 (16:54 -0700)]
am 4309f87d: DO NOT MERGE: Update OEM iptable hooks and ip fwd

* commit '4309f87d5baa54a2741f35e0cb09959c55ff1ab6':
  DO NOT MERGE: Update OEM iptable hooks and ip fwd

12 years agoDO NOT MERGE: Update OEM iptable hooks and ip fwd
Wink Saville [Fri, 29 Jul 2011 22:25:24 +0000 (15:25 -0700)]
DO NOT MERGE: Update OEM iptable hooks and ip fwd

This is a squash of two changes from partner repo:

    Clean up OEM iptables hooks

    Id: Ife7a1c08ca88beba2dede776d2e4dd6097dad05a

And

    Add hooks for OEM iptables rules and IP fwd

    - Useful for integrating peripherals that use IP for control and
    diagnostics.
    - Add hooks for specifying static iptables rules at startup.
    - Add system prop to keep IP forwarding enabled all the time.
    - Remove the ro.bootmode=bp-tools hacks.

    Id: Ic70d4c88179c530414505976193bf616037500a6

Bug: 5045218
Change-Id: I4229d3576426880b68ac448f9fbb67f2f8f304a0

12 years agoMerge "netd: NetlinkManager: don't fail if NETLINK_NFLOG socket is not there."
JP Abgrall [Thu, 28 Jul 2011 22:03:32 +0000 (15:03 -0700)]
Merge "netd: NetlinkManager: don't fail if NETLINK_NFLOG socket is not there."

12 years agoam 59da4baf: (-s ours) am b725a59f: Merge "DO NOT MERGE: NatController: remove flushi...
JP Abgrall [Wed, 27 Jul 2011 01:37:02 +0000 (18:37 -0700)]
am 59da4baf: (-s ours) am b725a59f: Merge "DO NOT MERGE: NatController: remove flushing the INPUT/OUTPUT tables." into honeycomb-LTE

* commit '59da4baf881d7f5e2ae82bead547766cbf2c9710':
  DO NOT MERGE: NatController: remove flushing the INPUT/OUTPUT tables.

12 years agoam 7d8c2811: am a45de8a8: Add dns proxy controls from opensource.
Robert Greenwalt [Wed, 27 Jul 2011 01:37:00 +0000 (18:37 -0700)]
am 7d8c2811: am a45de8a8: Add dns proxy controls from opensource.

* commit '7d8c2811e3604acfd6acfd2f7022919a633b394f':
  Add dns proxy controls from opensource.

12 years agoam b725a59f: Merge "DO NOT MERGE: NatController: remove flushing the INPUT/OUTPUT...
JP Abgrall [Wed, 27 Jul 2011 01:09:27 +0000 (18:09 -0700)]
am b725a59f: Merge "DO NOT MERGE: NatController: remove flushing the INPUT/OUTPUT tables." into honeycomb-LTE

* commit 'b725a59f3e45de8fcd3c01c512c94ba665acb992':
  DO NOT MERGE: NatController: remove flushing the INPUT/OUTPUT tables.

12 years agoMerge "DO NOT MERGE: NatController: remove flushing the INPUT/OUTPUT tables." into...
JP Abgrall [Wed, 27 Jul 2011 01:04:49 +0000 (18:04 -0700)]
Merge "DO NOT MERGE: NatController: remove flushing the INPUT/OUTPUT tables." into honeycomb-LTE

12 years agonetd: NetlinkManager: don't fail if NETLINK_NFLOG socket is not there.
JP Abgrall [Tue, 26 Jul 2011 22:36:40 +0000 (15:36 -0700)]
netd: NetlinkManager: don't fail if NETLINK_NFLOG socket is not there.

Some kernels used with ICS do not have the needed modules (quota2
with NFLOG support).
For those, we just don't allow NFLOG which will cripple quota alerts.
This is a temp workaround until kernels are prebuilts.

Change-Id: I403ba894aefb67996d791bd06055b8fec97d1407
Signed-off-by: JP Abgrall <jpa@google.com>
12 years agoam a45de8a8: Add dns proxy controls from opensource.
Robert Greenwalt [Tue, 26 Jul 2011 20:24:45 +0000 (13:24 -0700)]
am a45de8a8: Add dns proxy controls from opensource.

* commit 'a45de8a8d4def24fbcc21602400214b5ca7ffad1':
  Add dns proxy controls from opensource.

12 years agoDO NOT MERGE: NatController: remove flushing the INPUT/OUTPUT tables.
JP Abgrall [Thu, 23 Jun 2011 01:50:04 +0000 (18:50 -0700)]
DO NOT MERGE: NatController: remove flushing the INPUT/OUTPUT tables.

DO NOT MERGE: cherry-pick from master, as oem's will be updating this
file in HC.

It doesn't use them, so it should not have to flush them.
This is a minimalistic attempt to cooperate with the BandwidthController.

Change-Id: Ia175a86403adf034ac6f44d7ebc4ebe941881368

12 years agoAdd dns proxy controls from opensource.
Robert Greenwalt [Mon, 25 Jul 2011 23:53:52 +0000 (16:53 -0700)]
Add dns proxy controls from opensource.

Port of change 22099 from the opensource.
bug:5060618

Change-Id: Ic99345881fcb30c6f1d5545a32401e6ada865d78

12 years agowifi: Ensure that entropy file exists
Dmitry Shmidt [Mon, 25 Jul 2011 17:51:56 +0000 (10:51 -0700)]
wifi: Ensure that entropy file exists

Change-Id: Ib5ea7a6767a4ab7c4244bfc27248ee04340018a7
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agoMerge "netd: NetlinkManager: add support receiving quota2 log messages"
JP Abgrall [Mon, 25 Jul 2011 17:15:46 +0000 (10:15 -0700)]
Merge "netd: NetlinkManager: add support receiving quota2 log messages"

12 years agoMerge "netd: bandwidthcontroler: add support for alerts via iptables' quota2 log...
JP Abgrall [Mon, 25 Jul 2011 17:15:24 +0000 (10:15 -0700)]
Merge "netd: bandwidthcontroler: add support for alerts via iptables' quota2 log messages"

12 years agoMerge "softap: Add P2P option to fwreload command"
Dmitry Shmidt [Mon, 25 Jul 2011 00:13:17 +0000 (17:13 -0700)]
Merge "softap: Add P2P option to fwreload command"

12 years agosoftap: Add P2P option to fwreload command
Dmitry Shmidt [Sun, 24 Jul 2011 23:46:13 +0000 (16:46 -0700)]
softap: Add P2P option to fwreload command

Change-Id: I6fced56a6baa71a1d1fefe35832a43879ed12501
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agoAdd config update support for hostapd
Irfan Sheriff [Fri, 22 Jul 2011 22:20:21 +0000 (15:20 -0700)]
Add config update support for hostapd

Additional fixes:

Fix putting hostapd in daemon mode which results in init taking it over
and failure to stop

Also fix security check

Bug: 5069108
Change-Id: Ie0e2f975516975d270e48c9081480d85e201251f

12 years agoMerge "softap: Add hostapd support if BOARD_HOSTAPD_DRIVER is set"
Dmitry Shmidt [Fri, 22 Jul 2011 18:12:58 +0000 (11:12 -0700)]
Merge "softap: Add hostapd support if BOARD_HOSTAPD_DRIVER is set"

12 years agonetd: NetlinkManager: add support receiving quota2 log messages
JP Abgrall [Fri, 22 Jul 2011 00:21:49 +0000 (17:21 -0700)]
netd: NetlinkManager: add support receiving quota2 log messages

NetlinkManager, NetlinkHandler
 . added support for netlink's NETLINK_NFLOG family used by the updated xt_quota2.
 . it pushes the event all the wait to NetworkManagementService.java
    "linit alert <alert_name> <iface_name>"

This needs:
 - new kernel with quota2 changes that support logging via NETLINK's
   NETLINK_NFLOG family.
 - BandwidthController changes that setup the alerts.
 - system core NetlinkEvent that recognizes the NFLOG messages.
 - java land NetworkManagementService changes.

Change-Id: Id5b1026c6002803b5a1c0c7623cf7b1961de9802

12 years agosoftap: Add hostapd support if BOARD_HOSTAPD_DRIVER is set
Dmitry Shmidt [Thu, 21 Jul 2011 22:16:04 +0000 (15:16 -0700)]
softap: Add hostapd support if BOARD_HOSTAPD_DRIVER is set

Change-Id: Ic1d8e46edc351f8dd36f30abe957d536cf491164
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agonetd: bandwidthcontroler: add support for alerts via iptables' quota2 log messages
JP Abgrall [Thu, 14 Jul 2011 02:17:35 +0000 (19:17 -0700)]
netd: bandwidthcontroler: add support for alerts via iptables' quota2 log messages

* Fix quota2 updating. The old insert-new/delete-old scheme doesn't work as the kernel
 keeps the old counter assigned to the new rule.

* Add support for setting dummy quotas used only for alerts.

This needs:
 - new kernel with quota2 changes that support logging via NETLINK's
   NETLINK_NFLOG family.
 - NetlinkManager support for receiving the events.
 - java land handler for these new events.

* new commands
  - add/remove a dummy quota to generate an alert after <bytes> are seen including loopback.
    alerts are only triggered once.
    . ndc bandwidth setglobalalert <bytes>
       calling it multiple times, just re-arms the alert for the specified number of bytes.
        Use "ndc bandwidth getiquota singleAlert" to get what is left.
    . ndc bandwidth removeglobalalert
  - add/remove alert on a shared quota (similar accounting as shared quota)
    . ndc bandwidth setsharedalert <bytes>
        Requires that a shared quota already exist.
    . ndc bandwidth removesharedalert
        Removing the last of the shared quotas will remove the matching alert.
  - add/remove alert on an interface (similar accounting as interface quota)
    . ndc bandwidth setinterfacealert <iface> <bytes>
        Requires that a interface quota already exist.
    . ndc bandwidth removeinterfacealert <iface>
        Removing the interface quota will remove the matching alert.
  - get the quotas and alert leftovers
   . ndc bandwidth getquota
      shared quota leftover
   . ndc bandwidth getiquota <quota_name_or_iface>
      iface specific quota leftover
      Can be used to read-out alerts. E.g.
        setglobalalert 12345 -> getiquota globalAlert
        setsharedalert 12345 -> getiquota sharedAlert
        setinterfacealert iface0 12345 -> getiquota iface0Alert

Change-Id: Iea9698b9d20e713281755dac32b4772a6cf0e84e

12 years agonetd: bandwidthcontroller: use named quotas (via quota2)
JP Abgrall [Thu, 30 Jun 2011 02:23:04 +0000 (19:23 -0700)]
netd: bandwidthcontroller: use named quotas (via quota2)

Replace using the "quota" with "quota2".
Quota2 is SMP-safe, and allows sharing a quota between protocols.

Bug: 4646092
Change-Id: I69b1dd6d2c5c3b39cf0df175369ae5a28843d489
Signed-off-by: JP Abgrall <jpa@google.com>
12 years agoSoftap: Use wifi_get_fw_path() instead of predefined path
Dmitry Shmidt [Tue, 19 Jul 2011 20:55:25 +0000 (13:55 -0700)]
Softap: Use wifi_get_fw_path() instead of predefined path

Change-Id: I75d01f2d5a07298e53638aea2431030ca07fd458
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years agoReconcile with gingerbread-release
The Android Open Source Project [Mon, 18 Jul 2011 15:10:22 +0000 (08:10 -0700)]
Reconcile with gingerbread-release

Change-Id: I7ecfd1052c530b417f300e91c7ee28d1920dce2b

12 years agoRemove the simulator target from all makefiles.
Jeff Brown [Tue, 12 Jul 2011 05:12:35 +0000 (22:12 -0700)]
Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I1ef5377c66e08b450a4a40195b8fe29a8037a8be