OSDN Git Service
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
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
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.
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.
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
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
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
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
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
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
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
The Android Open Source Project [Thu, 15 Dec 2011 00:05:55 +0000 (16:05 -0800)]
Reconcile with ics-mr1-release
Change-Id: I95c0b924756d815c89e70c088b6e8003a54226f8
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
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
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
Jeff Sharkey [Thu, 1 Dec 2011 23:25:28 +0000 (15:25 -0800)]
Allow additional interface flags.
Bug:
5686458
Change-Id: I9c5147446636d32bb3a420a05199870cca5f013d
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
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.
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
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
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.
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
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
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
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
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
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
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
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
repo sync [Thu, 29 Sep 2011 23:10:42 +0000 (16:10 -0700)]
Add support to disable/enable ipv6
Bug:
5388757
Change-Id: I0506254948477cbff05603faed625cc73d94d777
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
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
Irfan Sheriff [Wed, 14 Sep 2011 22:03:21 +0000 (15:03 -0700)]
Merge "Netd 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
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
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
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>
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.
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.
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
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.
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.
Robert Greenwalt [Tue, 2 Aug 2011 20:00:11 +0000 (13:00 -0700)]
Add DROP rule for INVALID packets.
bug:
5094583
Change-Id: Ib942c557e7f2694b6ee18cc6562df597165894ce
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)"
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>
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
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
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
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."
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.
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.
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.
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
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>
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.
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
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
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>
JP Abgrall [Mon, 25 Jul 2011 17:15:46 +0000 (10:15 -0700)]
Merge "netd: NetlinkManager: add support receiving quota2 log messages"
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"
Dmitry Shmidt [Mon, 25 Jul 2011 00:13:17 +0000 (17:13 -0700)]
Merge "softap: 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>
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
Dmitry Shmidt [Fri, 22 Jul 2011 18:12:58 +0000 (11:12 -0700)]
Merge "softap: Add hostapd support if BOARD_HOSTAPD_DRIVER is set"
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
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>
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
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>
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>
The Android Open Source Project [Mon, 18 Jul 2011 15:10:22 +0000 (08:10 -0700)]
Reconcile with gingerbread-release
Change-Id: I7ecfd1052c530b417f300e91c7ee28d1920dce2b
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
android-merger [Fri, 8 Jul 2011 19:28:16 +0000 (12:28 -0700)]
reset, and keep history
The Android Open Source Project [Thu, 7 Jul 2011 22:22:41 +0000 (15:22 -0700)]
Reconcile with gingerbread-release
Change-Id: I5a9cde4afd6b2bc4a02eda27c9d919ebfd322d1d
android-merger [Thu, 7 Jul 2011 21:53:06 +0000 (14:53 -0700)]
Revert "netd: Enable the SO_PASSCRED socket option"
This reverts commit
79b579c92afc08ab12c0a5788d61f2dd2934836f.
JP Abgrall [Thu, 30 Jun 2011 02:21:58 +0000 (19:21 -0700)]
bandwidthcontroller: brute-force cleanup to catch costly_<iface> chains.
To help with development, where re-enable is used as a cleanup mechanism
we no remove ALL user chains.
Normally we only expect
costly, penalty_box, and costly_<iface>.
If in the future we have more chains outside of those, this will need
revisiting.
Change-Id: I45e504bc1fe4ad973c00308967a474c73e959666
JP Abgrall [Wed, 29 Jun 2011 22:46:45 +0000 (15:46 -0700)]
netd: bandwidthcontroller: fix removeiquota. remove excessive LOGD.
When doing
ndc bandwidth setiquota rmnet0 1235
ndc bandwidth removeiquota rmnet0
the remove would not cleanup the costly_rmnet0 chain.
Bug:
4975613
Change-Id: Ie2a593de78613dcf6833165c45fef75adf57ee23
Signed-off-by: JP Abgrall <jpa@google.com>
Kazuhiro Ondo [Tue, 28 Jun 2011 00:59:20 +0000 (17:59 -0700)]
am
a0eece26: am
6b858eb3: Keep IP forwarding enabled in tools mode.
* commit '
a0eece268a7dbd837f73c80ad97cbea81abebf11':
Keep IP forwarding enabled in tools mode.
Kazuhiro Ondo [Tue, 28 Jun 2011 00:58:23 +0000 (17:58 -0700)]
am
6b858eb3: Keep IP forwarding enabled in tools mode.
* commit '
6b858eb3b9b94b19c5153311e10b6e832722fb8e':
Keep IP forwarding enabled in tools mode.
Kazuhiro Ondo [Sat, 25 Jun 2011 01:31:03 +0000 (20:31 -0500)]
Keep IP forwarding enabled in tools mode.
Do not disable IP forwarding after Tethering session is over
in tools mode so that modem logging tools are functional across
tethering sessions.
Change-Id: Id6eb91ded458c57822e6a96006778e11f4038d52
Robert Greenwalt [Mon, 27 Jun 2011 21:04:16 +0000 (14:04 -0700)]
Merge "resolved conflicts for merge of
80adaddf to master"
Robert Greenwalt [Mon, 27 Jun 2011 21:02:54 +0000 (14:02 -0700)]
resolved conflicts for merge of
80adaddf to master
Change-Id: I53c036b229352430c3faf57ce1d02fa889827690
Mike J. Chen [Mon, 27 Jun 2011 19:56:33 +0000 (12:56 -0700)]
Merge changes Ie9674ca0,I8c0625a9
* changes:
Change string notification for link state change.
Revert "Revert "Add NETLINK_ROUTE socket creation and event propagation""
JP Abgrall [Sat, 25 Jun 2011 02:21:51 +0000 (19:21 -0700)]
netd: bandwidthcontroller: cleanup bool usage for readability.
replace stuff like:
f(buff, true, false) -> f(buff, ActionA, CaseD)
Change-Id: I8ff1d84f077d8f57263ecb7937b3f2caca86284b
JP Abgrall [Fri, 24 Jun 2011 18:58:14 +0000 (11:58 -0700)]
BandwidthController: cleanup ipv4/v6, set/remove multiple quotas.
Regroup the ipv4/ipv6 choice deeper down to avoid copypasted code.
Shared quota accross ifaces.
Single quota per ifaces.
Nothing preventing an iface from have a single and shared quota.
Might be close to having a working combination.
Added commands:
- shared quota
ndc bandwidth setquotas <quotaBytes> <iface> ...
ndc bandwidth setquota <iface> <quotaBytes>
ndc bandwidth removequota <iface>
ndc bandwidth removequotas <iface> ...
- quota per iface
ndc bandwidth setiquota <iface> <quotaBytes>
ndc bandwidth removeiquota <iface>
Change-Id: I370d223da3c8b6e16e8d0a455309ae9e0756a721
Mike J. Chen [Thu, 23 Jun 2011 22:11:53 +0000 (15:11 -0700)]
Change string notification for link state change.
Changed from linkstatus to linkstate to be more like the
notification function name.
Change-Id: Ie9674ca04bf9a9bdff2583786c301452d02b19fc
Signed-off-by: Mike J. Chen <mjchen@google.com>
Mike J. Chen [Thu, 23 Jun 2011 22:07:35 +0000 (15:07 -0700)]
Revert "Revert "Add NETLINK_ROUTE socket creation and event propagation""
This reverts commit
19fb0c4e5ec6a10473666a2d45267fbc8305ba85.
Conflicts:
NetlinkManager.cpp
Brings back Stan Chesnutt's change related to adding NETLINK_ROUTE
socket creation and event propagation.
Change-Id: I8c0625a95b7996ef75b883ce764c3244dd553a47
Signed-off-by: Mike J. Chen <mjchen@google.com>
JP Abgrall [Sat, 18 Jun 2011 06:17:28 +0000 (23:17 -0700)]
netd:bandwidth: initial pass at app-rules, and some ipv6.
Adds initial per-app penalty box rules, and prepares for
handling per iface quota.
The following commands work:
* penalty box
ndc bandwidth addnaughtyapps <uid> ...
ndc bandwidth removenaughtyapps <uid> ...
* Shared quota
- add (updates the bytes, if they differ from last time)
ndc bandwidth setquota <iface> <bytes>
ndc bandwidth setquota <iface1> <bytes>
ndc bandwidth setquota <iface2> <bytes>
- remove
ndc bandwidth removequota <iface>
[ oldschool: ndc bandwidth setquota <iface> -1 ]
Change-Id: Ibefc16e81c7713feb47577a9687dcd032dedf06e
JP Abgrall [Thu, 23 Jun 2011 01:50:04 +0000 (18:50 -0700)]
NatController: remove flushing the INPUT/OUTPUT tables.
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
Robert Greenwalt [Thu, 23 Jun 2011 18:12:17 +0000 (11:12 -0700)]
am
d41806cb: Merge "Add ResolverController class"
* commit '
d41806cb55874d0eaf82fe11ffc62cf50a227313':
Add ResolverController class
Robert Greenwalt [Thu, 23 Jun 2011 17:21:14 +0000 (10:21 -0700)]
Merge "Add ResolverController class"
Mike Lockwood [Tue, 31 May 2011 17:43:17 +0000 (13:43 -0400)]
Remove obsolete support for controlling RNDIS USB networking
Change-Id: I1a49dc2c96998e9a44729b4b0303dbe9eb8c6569
Signed-off-by: Mike Lockwood <lockwood@android.com>
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
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
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
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
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
The Android Open Source Project [Fri, 20 May 2011 21:19:45 +0000 (14:19 -0700)]
Reconcile with gingerbread-release
Change-Id: Ibac35b4865cd0c39eff053ad84bddab50a2d6d6e
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.
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.
The Android Automerger [Fri, 13 May 2011 21:27:38 +0000 (14:27 -0700)]
merge in gingerbread-release history after reset to gingerbread