History log of /system/netd/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3c903b555975fa59d6688a0a6417ac7512c202e7 10-Mar-2012 The Android Automerger <android-build@android.com> merge in ics-mr1-release history after reset to ics-mr1
63db18d9ab1802d56a8f0bb6314d07f0827b9aa3 10-Mar-2012 The Android Automerger <android-build@android.com> merge in ics-mr1-release history after reset to ics-mr1
eca2a7819bf3fbc5fddfda96321c595f5d819d28 09-Mar-2012 The Android Automerger <android-build@android.com> merge in ics-mr1-release history after reset to ics-mr1
1babab9febdbd05b7b6d72e0728f49ee8d4b9bd2 07-Mar-2012 Nick Kralevich <nnk@google.com> netd: do check on command, not buffer.

Bug: 6132094
Change-Id: I76aef21b07c07db76bbc6587ae732b1ceb4488ce
ogwrapper.c
e0cbe1e9349b1c7ea2ef65ac4fecd3f328f3f456 02-Mar-2012 The Android Automerger <android-build@android.com> merge in ics-mr1-release history after reset to ics-mr1
3c20787d7935c2016e8e3cc49d8f15647c12c41c 12-Jan-2012 Jaime A Lopez-Sollano <jaimel@quicinc.com> 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
atController.cpp
econdaryTableController.cpp
econdaryTableController.h
41c2f3ee4fb15f9fbdc22b163dc97e06e2109a7d 19-Jan-2012 The Android Automerger <android-build@android.com> merge in ics-mr1-release history after reset to ics-mr1
4ab468577647d1ee73810b89d2287eaa5546fecb 12-Jan-2012 Kazuhiro Ondo <kazuhiro.ondo@motorola.com> 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
ndroid.mk
andwidthController.cpp
atController.cpp
em_iptables_hook.cpp
em_iptables_hook.h
8a12dd0851cc2aaa1f6ffb27e5d7616733200c36 15-Dec-2011 JP Abgrall <jpa@google.com> 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
andwidthController.cpp
atController.cpp
econdaryTableController.cpp
hrottleController.cpp
ogwrapper.c
9e5e0ce62e88ddf9a09798eda51b0c270d354c8e 15-Dec-2011 JP Abgrall <jpa@google.com> 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
andwidthController.cpp
atController.cpp
econdaryTableController.cpp
hrottleController.cpp
ogwrapper.c
063af322b48ab1bb0c3e09eb0b64915ba568275b 19-Nov-2011 Robert Greenwalt <rgreenwalt@google.com> Fix some syntax issues with IP command.

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

bug:5615697
Change-Id: I0d5ad2ed7d13e4d5bd8c2f8ce15fc0ccb36a4690
atController.cpp
atController.h
econdaryTableController.cpp
econdaryTableController.h
fc97b82e02979f246d56a4bfd60e4aab8686d3f6 03-Nov-2011 Robert Greenwalt <rgreenwalt@google.com> Start using IP tool for advanced routing.

bug:5495862
bug:5396842
Change-Id: I51f21060947f57e63b18c4d35e9d49fac488d48a
ndroid.mk
ommandListener.cpp
ommandListener.h
atController.cpp
atController.h
econdaryTableController.cpp
econdaryTableController.h
f7bf29c8a37d65e132a4dceb7c5a4200ed5c3d79 02-Nov-2011 Robert Greenwalt <rgreenwalt@google.com> 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
ommandListener.cpp
atController.cpp
54b75b4e772ac77df141ab077be074bc1c098987 26-Oct-2011 Irfan Sheriff <isheriff@google.com> Use CCMP for WPA2 mode

TKIP+CCMP for WPA and the secure CCMP for WPA2

Bug:5515097
Change-Id: I877d1f4075c3df83149aca23b59c285d2fe093e1
oftapController.cpp
c6c673496184bed6d62cf92a6fc7ed43fd94acd5 08-Oct-2011 JP Abgrall <jpa@google.com> 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
andwidthController.cpp
andwidthController.h
ommandListener.cpp
c1b3870147acd0dd42e2e767df08b4d64d5d2423 30-Sep-2011 repo sync <isheriff@google.com> Add support to disable/enable ipv6

Bug: 5388757
Change-Id: I0506254948477cbff05603faed625cc73d94d777
ommandListener.cpp
ommandListener.h
1ed47c4a016e420a855ee46922e512150245ff61 27-Sep-2011 Lorenzo Colitti <lorenzo@google.com> Move the code to delete IP addresses to ifc_utils.

Change-Id: I04c8de503229d1dce6bd08c286b7017eaea11039
ommandListener.cpp
db7da58e8d2aa021060098057f944ef754be06e3 18-Sep-2011 JP Abgrall <jpa@google.com> 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
andwidthController.cpp
andwidthController.h
ommandListener.cpp
ommandListener.h
esponseCode.h
65969062a94e3a2d15a2536db297492f96a1f0aa 15-Sep-2011 Irfan Sheriff <isheriff@google.com> Merge "Netd comand to change IPv6 privacy extensions"
32a9dc6f484deb3462d11084caca21e3f1f662b2 14-Sep-2011 Irfan Sheriff <isheriff@google.com> Netd comand to change IPv6 privacy extensions

Bug: 3360737
Change-Id: Ifa13c425c6168acdd01600d49c1fb52288c60d3c
ommandListener.cpp
876666947664c718a8d0cae9bbddb06cc91f912c 08-Sep-2011 JP Abgrall <jpa@google.com> netd: BandwidthController: exclude loopback in all alert rules.

Have the alerts explicitly request "not loopback".

Change-Id: I7a569292e630c2b8ec76489643741f53ab85b84e
andwidthController.cpp
ab374f426a0d1d8598f3eb4b0339440dcb313a1a 03-Sep-2011 Irfan Sheriff <isheriff@google.com> 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
ommandListener.cpp
11b4e9b26fe7b878992162afb39f5a8acfd143ed 12-Aug-2011 JP Abgrall <jpa@google.com> 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>
andwidthController.cpp
andwidthController.h
atController.cpp
hrottleController.cpp
6ccebd085f8df439447ffe6060206a0a5af8d448 04-Aug-2011 Robert Greenwalt <rgreenwalt@google.com> am e98a5816: am 6e4d5db1: Fix two error-case unwinders.

* commit 'e98a581641a233fd048bf76f68650b627ef546e5':
Fix two error-case unwinders.
e98a581641a233fd048bf76f68650b627ef546e5 04-Aug-2011 Robert Greenwalt <rgreenwalt@google.com> am 6e4d5db1: Fix two error-case unwinders.

* commit '6e4d5db1b11f808bb4bdcc8dd45a7158c6c88515':
Fix two error-case unwinders.
6e4d5db1b11f808bb4bdcc8dd45a7158c6c88515 04-Aug-2011 Robert Greenwalt <rgreenwalt@google.com> Fix two error-case unwinders.

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

Change-Id: Ie4da4979a3ad0eedcb6d468fecdff6614b1819bd
atController.cpp
49012139e14e5f9cc4e452716e8164c3e7cfd9de 02-Aug-2011 Robert Greenwalt <rgreenwalt@google.com> am 69a5b777: am ddb9f6eb: Add DROP rule for INVALID packets.

* commit '69a5b7777f67f6d5ad9dbd33758332c7b0104613':
Add DROP rule for INVALID packets.
69a5b7777f67f6d5ad9dbd33758332c7b0104613 02-Aug-2011 Robert Greenwalt <rgreenwalt@google.com> am ddb9f6eb: Add DROP rule for INVALID packets.

* commit 'ddb9f6eb8d8c35f46c1e3da68f375b85903e85c9':
Add DROP rule for INVALID packets.
ddb9f6eb8d8c35f46c1e3da68f375b85903e85c9 02-Aug-2011 Robert Greenwalt <rgreenwalt@google.com> Add DROP rule for INVALID packets.

bug:5094583
Change-Id: Ib942c557e7f2694b6ee18cc6562df597165894ce
atController.cpp
802b7ca31e62785bf3e181368a2f213260f66cba 02-Aug-2011 Dmitry Shmidt <dimitrysh@google.com> Merge "softap: Increase delay after driver start to 800 ms (from 400)"
587d6232b604ee383d893362f37f9843f5ac2162 02-Aug-2011 Dmitry Shmidt <dimitrysh@google.com> 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>
oftapController.h
8093c1a0aa2eb1c82df07190a24dc224b9f9fd19 30-Jul-2011 Wink Saville <wink@google.com> 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
51c1ce04e8b16f29aa8d9727e65263d8f590c543 30-Jul-2011 Wink Saville <wink@google.com> am 4309f87d: DO NOT MERGE: Update OEM iptable hooks and ip fwd

* commit '4309f87d5baa54a2741f35e0cb09959c55ff1ab6':
DO NOT MERGE: Update OEM iptable hooks and ip fwd
4309f87d5baa54a2741f35e0cb09959c55ff1ab6 30-Jul-2011 Wink Saville <wink@google.com> 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
atController.cpp
atController.h
etherController.cpp
6fcb81453c7c759bbbfc5ec2f63205534e7c06e4 29-Jul-2011 JP Abgrall <jpa@google.com> Merge "netd: NetlinkManager: don't fail if NETLINK_NFLOG socket is not there."
afc5f95c6f18b2efd41b0d8c85377eb70fa396e9 27-Jul-2011 JP Abgrall <jpa@google.com> 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.
1bb28f46f995a3768c2bb6aafb2fb2bdfb820d6c 27-Jul-2011 Robert Greenwalt <rgreenwalt@google.com> am 7d8c2811: am a45de8a8: Add dns proxy controls from opensource.

* commit '7d8c2811e3604acfd6acfd2f7022919a633b394f':
Add dns proxy controls from opensource.
59da4baf881d7f5e2ae82bead547766cbf2c9710 27-Jul-2011 JP Abgrall <jpa@google.com> 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.
b725a59f3e45de8fcd3c01c512c94ba665acb992 27-Jul-2011 JP Abgrall <jpa@google.com> Merge "DO NOT MERGE: NatController: remove flushing the INPUT/OUTPUT tables." into honeycomb-LTE
8a41209c0188560a3b29c88fab7bd8a480c03892 27-Jul-2011 JP Abgrall <jpa@google.com> 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>
etlinkManager.cpp
7d8c2811e3604acfd6acfd2f7022919a633b394f 26-Jul-2011 Robert Greenwalt <rgreenwalt@google.com> am a45de8a8: Add dns proxy controls from opensource.

* commit 'a45de8a8d4def24fbcc21602400214b5ca7ffad1':
Add dns proxy controls from opensource.
d80e94ca116224bf52925a1503ced6f257cb88d6 23-Jun-2011 JP Abgrall <jpa@google.com> 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
atController.cpp
a45de8a8d4def24fbcc21602400214b5ca7ffad1 26-Jul-2011 Robert Greenwalt <rgreenwalt@google.com> Add dns proxy controls from opensource.

Port of change 22099 from the opensource.
bug:5060618

Change-Id: Ic99345881fcb30c6f1d5545a32401e6ada865d78
ndroid.mk
ommandListener.cpp
ommandListener.h
esolverController.cpp
esolverController.h
01e182f704b07d0763c0906ab3b706bcf6928896 25-Jul-2011 Dmitry Shmidt <dimitrysh@google.com> wifi: Ensure that entropy file exists

Change-Id: Ib5ea7a6767a4ab7c4244bfc27248ee04340018a7
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
oftapController.cpp
ed4401d0ff90fbb9e43e506ef768439d1f81cae2 25-Jul-2011 JP Abgrall <jpa@google.com> Merge "netd: NetlinkManager: add support receiving quota2 log messages"
000aaef4483752c988ea236938e4c8e45b547f22 25-Jul-2011 JP Abgrall <jpa@google.com> Merge "netd: bandwidthcontroler: add support for alerts via iptables' quota2 log messages"
d2d157cae8d9bcf0e4f20e3624597c752e97c9bf 25-Jul-2011 Dmitry Shmidt <dimitrysh@google.com> Merge "softap: Add P2P option to fwreload command"
54cf7fda69c3c442e7d2ac370a9c942fdb38dcd7 25-Jul-2011 Dmitry Shmidt <dimitrysh@google.com> softap: Add P2P option to fwreload command

Change-Id: I6fced56a6baa71a1d1fefe35832a43879ed12501
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
oftapController.cpp
78dcb76aff7d3b9458374832a79688d36901127f 23-Jul-2011 Irfan Sheriff <isheriff@google.com> 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
oftapController.cpp
oftapController.h
8ab120320313522050a34f45982942c08880350a 22-Jul-2011 Dmitry Shmidt <dimitrysh@google.com> Merge "softap: Add hostapd support if BOARD_HOSTAPD_DRIVER is set"
e0ebc46c0aa38ce4f35bd3b60c0fcb9204d4c35e 22-Jul-2011 JP Abgrall <jpa@google.com> 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
etlinkHandler.cpp
etlinkHandler.h
etlinkManager.cpp
etlinkManager.h
esponseCode.h
389f8d1550880f3bc67ade3e93f2ddb767e64092 22-Jul-2011 Dmitry Shmidt <dimitrysh@google.com> softap: Add hostapd support if BOARD_HOSTAPD_DRIVER is set

Change-Id: Ic1d8e46edc351f8dd36f30abe957d536cf491164
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
ndroid.mk
oftapController.cpp
8a93272255f1b7e3083a97e1e28ddf675c0c7fb0 14-Jul-2011 JP Abgrall <jpa@google.com> 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
andwidthController.cpp
andwidthController.h
ommandListener.cpp
esponseCode.h
bfa7466b328101a8b04807f26e85c84526c9a774 30-Jun-2011 JP Abgrall <jpa@google.com> 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>
andwidthController.cpp
fe15b63d9def3721bb0ee4d2fa36c6f4d0daf8aa 19-Jul-2011 Dmitry Shmidt <dimitrysh@google.com> Softap: Use wifi_get_fw_path() instead of predefined path

Change-Id: I75d01f2d5a07298e53638aea2431030ca07fd458
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
ndroid.mk
oftapController.cpp
06e176e2a824c5f6515893d119dd10603f9fc40f 18-Jul-2011 The Android Open Source Project <initial-contribution@android.com> Reconcile with gingerbread-release

Change-Id: I7ecfd1052c530b417f300e91c7ee28d1920dce2b
9b2c66653577ebcd36076533c3a33e490a4bc55b 12-Jul-2011 Jeff Brown <jeffbrown@google.com> Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I1ef5377c66e08b450a4a40195b8fe29a8037a8be
ndroid.mk
4c2b66678b24ec6401e36b307db93df8c4022876 08-Jul-2011 android-merger <android-build@android.com> reset, and keep history
ffbf657f58a825b60cd98c05ff4d0e2706824f78 08-Jul-2011 The Android Open Source Project <initial-contribution@android.com> Reconcile with gingerbread-release

Change-Id: I5a9cde4afd6b2bc4a02eda27c9d919ebfd322d1d
d77a0c71b123c9971b6f4c9394fad5a67a42984d 07-Jul-2011 android-merger <android-build@android.com> Revert "netd: Enable the SO_PASSCRED socket option"

This reverts commit 79b579c92afc08ab12c0a5788d61f2dd2934836f.
etlinkManager.cpp
39f8f24246a5dac21be5cc5e32c0f395ee803766 30-Jun-2011 JP Abgrall <jpa@google.com> 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
andwidthController.cpp
a9f802c23f4c2c53fa1065b75f712ce46f384c3a 30-Jun-2011 JP Abgrall <jpa@google.com> 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>
andwidthController.cpp
79bad9b7a43bd31c8f76a3364e2c881adb7c0c8b 28-Jun-2011 Kazuhiro Ondo <kazuhiro.ondo@motorola.com> am a0eece26: am 6b858eb3: Keep IP forwarding enabled in tools mode.

* commit 'a0eece268a7dbd837f73c80ad97cbea81abebf11':
Keep IP forwarding enabled in tools mode.
a0eece268a7dbd837f73c80ad97cbea81abebf11 28-Jun-2011 Kazuhiro Ondo <kazuhiro.ondo@motorola.com> am 6b858eb3: Keep IP forwarding enabled in tools mode.

* commit '6b858eb3b9b94b19c5153311e10b6e832722fb8e':
Keep IP forwarding enabled in tools mode.
6b858eb3b9b94b19c5153311e10b6e832722fb8e 25-Jun-2011 Kazuhiro Ondo <kazuhiro.ondo@motorola.com> 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
etherController.cpp
3d4363b4d84f66bba8153a2ac4afeac7ed064b5c 27-Jun-2011 Robert Greenwalt <rgreenwalt@google.com> Merge "resolved conflicts for merge of 80adaddf to master"
3c8cc74f81d0f81204bd827076889bb51143dff8 27-Jun-2011 Robert Greenwalt <rgreenwalt@google.com> resolved conflicts for merge of 80adaddf to master

Change-Id: I53c036b229352430c3faf57ce1d02fa889827690
40cd7e0fdbbc7463b6fb367c0d9bf95dec82a13e 27-Jun-2011 Mike J. Chen <mjchen@google.com> Merge changes Ie9674ca0,I8c0625a9

* changes:
Change string notification for link state change.
Revert "Revert "Add NETLINK_ROUTE socket creation and event propagation""
26e0d49fa743d7881104196a9eda733bd2aac92f 25-Jun-2011 JP Abgrall <jpa@google.com> netd: bandwidthcontroller: cleanup bool usage for readability.

replace stuff like:
f(buff, true, false) -> f(buff, ActionA, CaseD)

Change-Id: I8ff1d84f077d8f57263ecb7937b3f2caca86284b
andwidthController.cpp
andwidthController.h
0dad7c2f1f6994fbe5e85b9e1fc72d29d6453211 24-Jun-2011 JP Abgrall <jpa@google.com> 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
andwidthController.cpp
andwidthController.h
ommandListener.cpp
a583f8be6126d3116311e96c6fd8bafcbaf2b431 24-Jun-2011 Mike J. Chen <mjchen@google.com> 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>
etlinkHandler.cpp
564df4efc87f3d04c3570836d38134fd949c4caf 24-Jun-2011 Mike J. Chen <mjchen@google.com> 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>
etlinkHandler.cpp
etlinkHandler.h
etlinkManager.cpp
etlinkManager.h
fa6f46d3370ae5475fc3bc8273bbe04ee7348d60 18-Jun-2011 JP Abgrall <jpa@google.com> 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
andwidthController.cpp
andwidthController.h
ommandListener.cpp
2ad297402daa97238e3fb099fe547e2c0b2cdc4b 23-Jun-2011 JP Abgrall <jpa@google.com> 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
atController.cpp
80adaddfe0a997d7c9f45fafbd6f8b05e14d119c 23-Jun-2011 Robert Greenwalt <rgreenwalt@google.com> am d41806cb: Merge "Add ResolverController class"

* commit 'd41806cb55874d0eaf82fe11ffc62cf50a227313':
Add ResolverController class
d41806cb55874d0eaf82fe11ffc62cf50a227313 23-Jun-2011 Robert Greenwalt <rgreenwalt@google.com> Merge "Add ResolverController class"
786d1122d6a0a7b4bf16fdafe3b710759acc5094 31-May-2011 Mike Lockwood <lockwood@android.com> Remove obsolete support for controlling RNDIS USB networking

Change-Id: I1a49dc2c96998e9a44729b4b0303dbe9eb8c6569
Signed-off-by: Mike Lockwood <lockwood@android.com>
ndroid.mk
ommandListener.cpp
ommandListener.h
sbController.cpp
sbController.h
e734edd35d8d02da96330d77420650c044a12527 16-Jun-2011 Irfan Sheriff <isheriff@google.com> Add netd command to clean up IP addresses

Bug: 4676254
Change-Id: Ifb0b573750504f5daeb8db038d13dddd553797de
ommandListener.cpp
4a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11 16-Jun-2011 JP Abgrall <jpa@google.com> 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
ndroid.mk
andwidthController.cpp
andwidthController.h
ommandListener.cpp
ommandListener.h
4d0342ec22cc5ef0edc27033e2dcdacbb31d47f3 03-Jun-2011 John Michelau <john.michelau@motorola.com> 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
0b0383befa6843ad32c3ff30da3e91a0c0a8f9c7 28-May-2011 John Michelau <john.michelau@motorola.com> am ac208608: Do not wipe all netd iptables rules in test mode

* commit 'ac208608c9e10ef199fdd11c38a31675ee9290c0':
Do not wipe all netd iptables rules in test mode
ac208608c9e10ef199fdd11c38a31675ee9290c0 28-May-2011 John Michelau <john.michelau@motorola.com> 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
atController.cpp
f65f16552da0a10cc01e99b85b73d3f07188336f 20-May-2011 The Android Open Source Project <initial-contribution@android.com> Reconcile with gingerbread-release

Change-Id: Ibac35b4865cd0c39eff053ad84bddab50a2d6d6e
2beda2d6ec8a5b36a1d36a104521b95845a3a955 19-May-2011 Robert Greenwalt <rgreenwalt@google.com> am 442017ef: am e019b659: Add v4/v6 route add/remove to netd.

* commit '442017eff8f783a2ea86d73c2ee9d88aef175327':
Add v4/v6 route add/remove to netd.
442017eff8f783a2ea86d73c2ee9d88aef175327 19-May-2011 Robert Greenwalt <rgreenwalt@google.com> am e019b659: Add v4/v6 route add/remove to netd.

* commit 'e019b65925217bcc3ad9b662aa3125f0593057af':
Add v4/v6 route add/remove to netd.
4415a6992691845c86bbb7b8ac9bd4c620338daa 13-May-2011 The Android Automerger <android-build@android.com> merge in gingerbread-release history after reset to gingerbread
e019b65925217bcc3ad9b662aa3125f0593057af 10-May-2011 Robert Greenwalt <rgreenwalt@google.com> 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
ommandListener.cpp
111b24e1c64747b70e59bc4cc02fac81b11b7812 04-May-2011 Brian Carlstrom <bdc@google.com> am 38bfbace: resolved conflicts for merge of d1aed628 to honeycomb-plus-aosp

* commit '38bfbace16fa8dc7e69761e1f29586d0ef5ea90c':
DNS Proxy should not hang on addresses containing null bytes
38bfbace16fa8dc7e69761e1f29586d0ef5ea90c 04-May-2011 Brian Carlstrom <bdc@google.com> resolved conflicts for merge of d1aed628 to honeycomb-plus-aosp

Change-Id: I6a1ffad61d29c6d361272bdd55522f4bd5f0e2c5
d1aed628997033076580580db381eaee0a3d29df 03-May-2011 Brian Carlstrom <bdc@google.com> Merge "DNS Proxy should not hang on addresses containing null bytes"
dfc668ef05df9bb150c25590a1afb17fc3101e60 02-May-2011 Brian Carlstrom <bdc@google.com> 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
1eef3e2f220e264984e1c9a94f3782a1350a3ff9 30-Apr-2011 Brian Carlstrom <bdc@google.com> 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
5c6d6af88f9db03493ef9926e0ceab30c8b132c9 30-Apr-2011 Brian Carlstrom <bdc@google.com> 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
nsProxyListener.cpp
nsProxyListener.h
1871a4f2b20f5d2e52d67b6d91da4f8734455cd6 27-Apr-2011 Brian Carlstrom <bdc@google.com> 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
nsProxyListener.cpp
nsProxyListener.h
89c1e975f0c03997808d35c7be10b244c5309f9f 29-Apr-2011 Mattias Falk <mattias.falk@sonyericsson.com> Add ResolverController class

Added a ResolverController class that handles
the communication with the dns resolver in
netd.

Change-Id: I0f71bd516109fd942e68b3400666c7a859228372
ndroid.mk
ommandListener.cpp
ommandListener.h
esolverController.cpp
esolverController.h
0475ae98cd8f45de815d67d1966edaf5997be9a9 27-Apr-2011 Brian Carlstrom <bdc@google.com> 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
nsProxyListener.cpp
nsProxyListener.h
14998b1aca89bb75f9e3d3bf080610a9cddce2dd 27-Apr-2011 Conley Owens <cco3@android.com> 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)
3a74e2f631209cf96c90b56e95c86d2bde1bb29e 27-Apr-2011 Conley Owens <cco3@android.com> 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)
c7d5ce4af83acc83c4d871ee57d118d7d9a81188 27-Apr-2011 Conley Owens <cco3@android.com> Ignore change "Set SO_PASSCRED on the uevent socket." in favor of change
in internal change.

Change-Id: I9f78c5e0e7c3cb4714ce8f908d1478dadf027d97
93e79f10ff54f713106a7ae3ebc0baebba7c4de0 26-Apr-2011 Conley Owens <cco3@android.com> Merge "Set SO_PASSCRED on the uevent socket. (needed for change I393c21da)"
e6ab884a82964831ec075fa48d6935cc847e31b6 25-Apr-2011 Vernon Tang <vt@foilhead.net> Set SO_PASSCRED on the uevent socket. (needed for change I393c21da)

Change-Id: I11767da938f6e8fd9b3b604218c26c3c8b8da881
etlinkManager.cpp
8cd1bc2c5f2033e29d036210dfe5cb07666d0850 20-Apr-2011 Nick Kralevich <nnk@google.com> am adb408dc: am d5b10d36: netd: Enable the SO_PASSCRED socket option

* commit 'adb408dc79639b5377c58d306484bc388062d195':
netd: Enable the SO_PASSCRED socket option
adb408dc79639b5377c58d306484bc388062d195 20-Apr-2011 Nick Kralevich <nnk@google.com> am d5b10d36: netd: Enable the SO_PASSCRED socket option

* commit 'd5b10d3633c6717b46763edf1a50d3e29a007592':
netd: Enable the SO_PASSCRED socket option
d5b10d3633c6717b46763edf1a50d3e29a007592 19-Apr-2011 Nick Kralevich <nnk@google.com> 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
etlinkManager.cpp
9642e016605c1faaf711bc80bb25f197ec270ff9 19-Apr-2011 Nick Kralevich <nnk@google.com> am ea52906e: am 97f5eec2: am 79b579c9: netd: Enable the SO_PASSCRED socket option

* commit 'ea52906efcdcead1b2c7a12e0d5fa16374c9892c':
netd: Enable the SO_PASSCRED socket option
ea52906efcdcead1b2c7a12e0d5fa16374c9892c 19-Apr-2011 Nick Kralevich <nnk@google.com> am 97f5eec2: am 79b579c9: netd: Enable the SO_PASSCRED socket option

* commit '97f5eec2ac9e78b8388be52be1ea95b4462537ee':
netd: Enable the SO_PASSCRED socket option
951528ad605f9d398f7e061241f45f7a3618d764 19-Apr-2011 Nick Kralevich <nnk@google.com> netd: Enable the SO_PASSCRED socket option

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

Change-Id: I8a352573c7e49d99b4f2fdb2e4ce9abe58d4fc49
etlinkManager.cpp
97f5eec2ac9e78b8388be52be1ea95b4462537ee 19-Apr-2011 Nick Kralevich <nnk@google.com> am 79b579c9: netd: Enable the SO_PASSCRED socket option

* commit '79b579c92afc08ab12c0a5788d61f2dd2934836f':
netd: Enable the SO_PASSCRED socket option
79b579c92afc08ab12c0a5788d61f2dd2934836f 19-Apr-2011 Nick Kralevich <nnk@google.com> netd: Enable the SO_PASSCRED socket option

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

Change-Id: I8a352573c7e49d99b4f2fdb2e4ce9abe58d4fc49
etlinkManager.cpp
34ffd85aed3838d53bd1136c751a7825de1940e0 17-Mar-2011 Brad Fitzpatrick <bradfitz@android.com> 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
nsProxyListener.cpp
nsProxyListener.h
666fe255fa581965d2835bd581cd5a8959411067 08-Mar-2011 Dmitry Shmidt <dimitrysh@google.com> Softap: Add 'clients' command

Change-Id: I3694a0b2b570e0925b7f807f133e6fa5d95c3ac2
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
ommandListener.cpp
oftapController.cpp
oftapController.h
a0c7ed2750c24550b086dfdebaf34f8fd45581c9 23-Feb-2011 David Turner <digit@android.com> am 0a60eb99: am 54a9575b: Merge "Add GetHostByAddrHandler to DnsProxyListener"

* commit '0a60eb99298e54a3fca719f6695b1d7347dc849a':
Add GetHostByAddrHandler to DnsProxyListener
0a60eb99298e54a3fca719f6695b1d7347dc849a 22-Feb-2011 David Turner <digit@android.com> am 54a9575b: Merge "Add GetHostByAddrHandler to DnsProxyListener"

* commit '54a9575bb7a83ef859ebf4fa2cd610e65b6e9db2':
Add GetHostByAddrHandler to DnsProxyListener
54a9575bb7a83ef859ebf4fa2cd610e65b6e9db2 17-Feb-2011 David Turner <digit@android.com> Merge "Add GetHostByAddrHandler to DnsProxyListener"
1dbd6cf148ea3fab57ec0644c336e94c78a488be 15-Feb-2011 Mattias Falk <mattias.falk@sonyericsson.com> 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
nsProxyListener.cpp
nsProxyListener.h
1d93e170f13b221362ee268fdc94b25db06c21c9 01-Feb-2011 Robert Greenwalt <rgreenwalt@google.com> Stop using netmask in the framework.

Use prefixlength instead.
bug:2542681

Change-Id: I4cc0d9a84a5b043da7f8cb19a42cc6aaae3f9584
ommandListener.cpp
5c140d71edf861f8c6c47dc9a18c3b54aac7dea1 26-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> am 0787d3c9: am 2446b68f: Merge "Fix the DNS proxy again, for reals."

* commit '0787d3c93bd52d8799bc1fbc4848e56d669337f7':
Fix the DNS proxy again, for reals.
d18375235c62480b70ec9f271c9ef93c2e2c6014 26-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> am 8cee7841: am 41efab55: Merge "Fix DNS proxy."

* commit '8cee7841d6aec9868dc94961e42277e332376f12':
Fix DNS proxy.
2c028218ea56c5fcf6f5afe34b01861be4006d71 26-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> am e2e04304: am b9cab4ff: (-s ours) Merge "DNS proxy thread in netd."

* commit 'e2e043049e6c820a3ba03f89737c083796e238dc':
DNS proxy thread in netd.
0787d3c93bd52d8799bc1fbc4848e56d669337f7 26-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> am 2446b68f: Merge "Fix the DNS proxy again, for reals."

* commit '2446b68f8c0d72972f8f6ec7fa972d05a29c9f02':
Fix the DNS proxy again, for reals.
8cee7841d6aec9868dc94961e42277e332376f12 26-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> am 41efab55: Merge "Fix DNS proxy."

* commit '41efab55c8ca0344d5d68d0a3ab5b1b43f905e3b':
Fix DNS proxy.
e2e043049e6c820a3ba03f89737c083796e238dc 26-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> am b9cab4ff: (-s ours) Merge "DNS proxy thread in netd."

* commit 'b9cab4ff6f6d6581574157662878d4c3fa28185e':
DNS proxy thread in netd.
2446b68f8c0d72972f8f6ec7fa972d05a29c9f02 26-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> Merge "Fix the DNS proxy again, for reals."
41efab55c8ca0344d5d68d0a3ab5b1b43f905e3b 26-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> Merge "Fix DNS proxy."
b9cab4ff6f6d6581574157662878d4c3fa28185e 26-Jan-2011 Brad Fitzpatrick <bradfitz@android.com> Merge "DNS proxy thread in netd."
19fb0c4e5ec6a10473666a2d45267fbc8305ba85 09-Jan-2011 Wink Saville <wink@google.com> Revert "Add NETLINK_ROUTE socket creation and event propagation"

This reverts commit f6a7ad814dca2f67907eaed2cc0609c684850969.
etlinkHandler.cpp
etlinkHandler.h
etlinkManager.cpp
etlinkManager.h
df9a6a82700a14169cc9d0b74833f1e261b171c6 02-Nov-2010 Brad Fitzpatrick <bradfitz@android.com> Fix the DNS proxy again, for reals.

me == the suck this morning

Bug: 3157030
Change-Id: Ib87ed047cd6999ee3d29b392acc7a559d9bb7349
nsProxyListener.cpp
89b99f2375271f2020dbb41ae96afd8c17b8e11a 02-Nov-2010 Brad Fitzpatrick <bradfitz@android.com> 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
nsProxyListener.cpp
4e248e5a7a542067fd3f0467680eef2f92b1e195 27-Oct-2010 Brad Fitzpatrick <bradfitz@android.com> 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
ndroid.mk
nsProxyListener.cpp
nsProxyListener.h
ain.cpp
f6a7ad814dca2f67907eaed2cc0609c684850969 05-Jan-2011 Stan Chesnutt <chesnutt@google.com> Add NETLINK_ROUTE socket creation and event propagation

Change-Id: I8cc8788661640600bceadeba8169e239bba98dec
etlinkHandler.cpp
etlinkHandler.h
etlinkManager.cpp
etlinkManager.h
ff2c0d8c13457e43f0d4bf06d3177271aac104c1 17-Nov-2010 Olivier Bailly <olivier@google.com> Add missing include headers for compilation on x86 targets.

Change-Id: I99f7b79bfb5b6305a0772f418a54ace50cac1bbe
ommandListener.cpp
nsProxyListener.cpp
atController.cpp
etlinkHandler.cpp
anController.cpp
ppController.cpp
oftapController.cpp
etherController.cpp
hrottleController.cpp
sbController.cpp
40d0a52a74e2e915f4b595ba6c7afaa7c8e9626d 04-Nov-2010 Jean-Baptiste Queru <jbq@google.com> am f444b341: Merge aaf2e765 from open-source master

* commit 'f444b341768afcdb3f0934c068f3ead6bafdab78':
Include <bluedroid/bluetooth.h> only if HAVE_BLUETOOTH is defined.
f444b341768afcdb3f0934c068f3ead6bafdab78 04-Nov-2010 Jean-Baptiste Queru <jbq@google.com> Merge aaf2e765 from open-source master

Change-Id: I523c3e7def1d8dc1c9fa9308143bee952e73eeb9
aaf2e7655bcc7374c3562d2daf76577d4c3ac54c 03-Nov-2010 Jean-Baptiste Queru <jbq@google.com> Merge "Include <bluedroid/bluetooth.h> only if HAVE_BLUETOOTH is defined."
6c798fbf4e89c4058f046a65ee4f9aa5647e43e1 02-Nov-2010 Brad Fitzpatrick <bradfitz@android.com> Fix the DNS proxy again, for reals.

me == the suck this morning

Bug: 3157030
Change-Id: Ib87ed047cd6999ee3d29b392acc7a559d9bb7349
nsProxyListener.cpp
e6a3a58d6aa4b551e38e1e19fdfea2c0d2841b85 02-Nov-2010 Brad Fitzpatrick <bradfitz@android.com> 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
nsProxyListener.cpp
007e987fee7e815e0c4bc820f434a632b7a69a9d 27-Oct-2010 Brad Fitzpatrick <bradfitz@android.com> 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
ndroid.mk
nsProxyListener.cpp
nsProxyListener.h
ain.cpp
b5ff9b277f256df84caf3d798ccc83b4740a1d31 13-Oct-2010 Paul Eastham <eastham@google.com> Remove STOPSHIP comment

Change-Id: I2d42d6ddb16f88929b5edeeeb653feca8348e804
atController.cpp
fbd11c41aeb535723b78a61087fb436e64891055 12-Oct-2010 jmzhu <jmzhu@marvell.com> netd: softap: Add sub-ioctl command support

Change-Id: Ieb344fbb8853019e92a7385f7a190aa7451102dc
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
oftapController.cpp
oftapController.h
56b6d45ebd9a9ae52ec5b75e7096cb02a23af1be 23-Sep-2010 Dmitry Shmidt <dimitrysh@google.com> Merge "softap: Incapsulate command call"
6665fb2adf78beddde21f7f3088a695646ca8c57 23-Sep-2010 Dmitry Shmidt <dimitrysh@google.com> softap: Incapsulate command call

Change-Id: I9c123252b3b5fa8649876e7e9138927d25dd1812
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
oftapController.cpp
oftapController.h
e7732280e7af281d35f90d7794a31a7f6e10f185 20-Sep-2010 Brad Fitzpatrick <bradfitz@android.com> Use ptsname_r instead of ptsname in logwrapper.

Also other misc suggestions and fixes from Markus' review.

Bug: 3017876
Change-Id: I503f0340c2d75afb6850e36c1586f7f495638036
ogwrapper.c
faabd3d839d1503aa4ed82442fbff29ba0c70897 20-Sep-2010 Brad Fitzpatrick <bradfitz@android.com> Re-sync netd and vold's logwrapper.c forks.

Change-Id: Ie7ad47f0e9bfb862b92cd34070b79b6003549a16
ogwrapper.c
7826bd095a7ecfd642524cfd93a39a52986b73fc 17-Aug-2010 Rene Bolldorf <xsecute@googlemail.com> Include <bluedroid/bluetooth.h> only if HAVE_BLUETOOTH is defined.

Change-Id: Ie679cf8b382c4d0abafc0f81ab28fa0762ff179c
anController.cpp
a783390cc37cc8321fe695ba95ffaa5b6a2ed05b 14-May-2010 Nick Kralevich <nnk@google.com> Get rid of warnings when compiled with -Wformat-security

Change-Id: Iaed2edb7b43da5cb5cdd0bf641e45480633301fd
ogwrapper.c
6a5a63bd690b25d9c0b590f19169d6d3060f2330 30-Apr-2010 San Mehat <san@google.com> Merge "netd: Switch throttling to use HTB instead of CBQ" into froyo
9d8d728596234e1e49cb1f8267b190bcc2d4b685 30-Apr-2010 San Mehat <san@google.com> netd: Switch throttling to use HTB instead of CBQ

Change-Id: I5247c9b5264db374442d19d903a250413057f19d
Signed-off-by: San Mehat <san@google.com>
hrottleController.cpp
37dc4a51774b9c8a95205cb825eae6753170a851 29-Apr-2010 Robert Greenwalt <robdroid@android.com> Fix fd leaks

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

Change-Id: I90d25dba2a262b620373270832eb3189616c720d
etherController.cpp
sbController.cpp
ogwrapper.c
7421ff5c5f96a04837352d69ab8b0749855b4446 23-Apr-2010 Dmitry Shmidt <dimitrysh@google.com> Merge "softap: Add delay after driver start, return 0 if softap was started" into froyo
a165913421c5bed00a1f0b8e79e35e55b82aebbe 23-Apr-2010 Dmitry Shmidt <dimitrysh@google.com> softap: Add delay after driver start, return 0 if softap was started

Change-Id: I3e155cc7c118c21d5e66163bd678104d812465de
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
oftapController.cpp
oftapController.h
651417c7c8662572de761c3b9260b1241ff21a79 23-Apr-2010 Robert Greenwalt <robdroid@android.com> 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
ommandListener.cpp
31c61c80a013bd1a050f0f4103e13fba62bf1717 14-Apr-2010 Robert Greenwalt <robdroid@android.com> 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
ommandListener.cpp
7e1f476ce965d9bde6e834bbe862faef548b2abb 10-Apr-2010 San Mehat <san@google.com> netd: Add ingress throttling

Change-Id: Id86a0d0d0bdfa9bca36e7c7bce7e9290c8532082
Signed-off-by: San Mehat <san@google.com>
hrottleController.cpp
a1992c9ff3e0d180c1f3042658ab9671d61a2fb8 08-Apr-2010 San Mehat <san@google.com> netd: Plumb interface throttling

Change-Id: I9092a37b3d5f2bfa4f49ddc473d0a5490abaae8f
Signed-off-by: San Mehat <san@google.com>
ndroid.mk
ommandListener.cpp
hrottleController.cpp
hrottleController.h
ogwrapper.c
321efa7340e327b25b4ea4e49d86817070a301c9 03-Apr-2010 Robert Greenwalt <robdroid@android.com> Fix network byte-count reading.

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

bug:2561759
Change-Id: I571c9871db424d349bc47b4d15c6015a33be6f2a
ommandListener.cpp
8e46896b4c4be5deaef651a12b17314f63ae9070 01-Apr-2010 San Mehat <san@google.com> netd: Add skelaton support for throttling

Change-Id: I361f3c4ac30f7bb6efe4ed703405f0e843b075b4
Signed-off-by: San Mehat <san@google.com>
ommandListener.cpp
ommandListener.h
esponseCode.h
210b97745e14830cdb1f29ee1109e6e516f4e6f6 25-Mar-2010 Robert Greenwalt <robdroid@android.com> Fix bug in NATing code.

Silly errors in refcount logic did the wrong thing.

Change-Id: I2cfc208615258397501450717cfcb7eb0386c9d4
atController.cpp
3208ea0b6cce28e7aef8459d548fd86df329e34f 25-Mar-2010 Robert Greenwalt <robdroid@android.com> Add support for multiple dhcp ranges.

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

bug:2533491
Change-Id: I3b568e81c048c6aff1a752ac4a81669034104413
ommandListener.cpp
etherController.cpp
etherController.h
1caafe66a6b927fa5d8eb4c59ec9eb48b0b1b075 24-Mar-2010 Robert Greenwalt <robdroid@android.com> 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
atController.cpp
atController.h
3df450af1c2e35d854768a508b6905c6794f7a74 18-Mar-2010 Dmitry Shmidt <dimitrysh@google.com> softap: Add delay after startap, set and stopap calls

Change-Id: I9b34d610b3576764324efbf78bb55322d1067378
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
oftapController.cpp
oftapController.h
a2d7e3e7d6e3f163f06e522378c6e2bd5cee28f8 15-Mar-2010 Kenny Root <kroot@google.com> netd: Use OpenSSL APIs for WPA-PSK calculation

Change-Id: Ibe2040a2ede58fcfad5b27cdb01a107fbf2c9f3d
ndroid.mk
oftapController.cpp
ha1.c
ha1.h
c3539e22bd7a59a12542b9ad961f7d7f0db9a8df 12-Mar-2010 Dmitry Shmidt <dimitrysh@google.com> netd: softap: Add softap start / stop driver commands

Change-Id: I2081e4943b6b93109288e8d764ce25a55f3b6198
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
ommandListener.cpp
oftapController.cpp
oftapController.h
9178b7390f9927aed57ae4a2da5b48991ed2aeea 12-Mar-2010 Dmitry Shmidt <dimitrysh@google.com> netd: softap: Fix driver API for SoftAP

Change-Id: I5e17b2369d5ef34ea29b0c1b0df1d4977ff109ce
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
oftapController.cpp
31fd6c5f3e9c39a13b028718dba5921a4300988c 12-Mar-2010 Dmitry Shmidt <dimitrysh@google.com> netd: softap: Add FW reload processing

Change-Id: I731c2e390187c0fa5f69779cd25d8f2388ee511e
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
ndroid.mk
ommandListener.cpp
oftapController.cpp
oftapController.h
321f95a95cd41e0f58a72ca4f382d7e0a7f26d01 10-Mar-2010 Dmitry Shmidt <dimitrysh@google.com> netd: softap: Add passphrase to hex conversion

Change-Id: Ia9b141cb436336deec6d94af701e6d807baa2f99
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
ndroid.mk
oftapController.cpp
ha1.c
ha1.h
7977d67059ef94eefa9b14038df156b416fef877 09-Mar-2010 Dmitry Shmidt <dimitrysh@google.com> netd: softap: Change "set" to use separate arguments

Change-Id: Id5f2adb41c671f2978fa3fe939b1a3b15a537165
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
oftapController.cpp
oftapController.h
9da1a982e6c86fd8473138254aac73359a742bf5 09-Mar-2010 Jean-Baptiste Queru <jbq@google.com> Add an empty CleanSpec.mk

Change-Id: Ic22ebb3ef1b4f4a3b44fe1d7975bd851c1fc12bd
leanSpec.mk
c2f87fca30aedd08c468d6f25458769944697f10 04-Mar-2010 Irfan Sheriff <isheriff@google.com> Merge "softap: Add basic functionality directly through WEXT"
84c65a62fe7b053fed7f20274ca7379627a87b79 03-Mar-2010 Dmitry Shmidt <dimitrysh@google.com> softap: Add basic functionality directly through WEXT

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
oftapController.cpp
oftapController.h
f15891b981b9a0ee5ab6c095b9a300bf224f2032 03-Mar-2010 Mike Lockwood <lockwood@android.com> Fix typo in UsbController::isRNDISStarted()

Signed-off-by: Mike Lockwood <lockwood@android.com>
sbController.cpp
e7b9422f0dc7a18041536c63efe74c7095496258 18-Feb-2010 Robert Greenwalt <robdroid@android.com> 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)
ommandListener.cpp
3e6ba3ce1abda6071d5b01f53ca6039bb7b5e2d3 18-Feb-2010 Robert Greenwalt <robdroid@android.com> Add enable/disable control of USB networking
ndroid.mk
ommandListener.cpp
ommandListener.h
sbController.cpp
sbController.h
dc22e651287f19675ec1b46a04b335c360ea74af 18-Feb-2010 Kenny Root <kroot@google.com> Merge "Check total string length of supplied DNS servers"
cf52faf90be32aab3d0c4736a95f26923227e475 18-Feb-2010 Kenny Root <kroot@google.com> 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
etherController.cpp
67c5753274ee828b56f96b5e9cdae64c8562ad52 18-Feb-2010 Robert Greenwalt <robdroid@android.com> 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.
etlinkHandler.cpp
etlinkHandler.h
etlinkManager.cpp
esponseCode.h
5af38c360587ca2eef0badf6137ccf018f8cd4aa 10-Feb-2010 Dmitry Shmidt <dimitrysh@google.com> netd: Add Softap controller skeleton functions

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
ndroid.mk
ommandListener.cpp
ommandListener.h
esponseCode.h
oftapController.cpp
oftapController.h
73ea55b52895727635705f18629406c58ca2044c 05-Feb-2010 Robert Greenwalt <robdroid@android.com> Silence PPPDs noisy logs.
ppController.cpp
3c2e611a921029a81dd7ff9c6d505b0b5e740014 03-Feb-2010 San Mehat <san@google.com> netd: Don't print error on unknown Netlink event

Signed-off-by: San Mehat <san@google.com>
etlinkHandler.cpp
74d8fdd307275bfdf95dcf61d9e6366e87da24ec 01-Feb-2010 Robert Greenwalt <robdroid@android.com> Add specification of ms-dns arg to pppd.

This lets us tell the pc to use the tethered android as their dns server.

bug:2281900
ommandListener.cpp
ppController.cpp
ppController.h
f1c368a83b738658d27720898b433bbc010123ba 28-Jan-2010 San Mehat <san@google.com> netd: Remove sigchild handler and fix a bluetooth makefile bug

Signed-off-by: San Mehat <san@google.com>
ndroid.mk
ain.cpp
01fed783828b592cda3b774deea4099a9e690e3d 23-Jan-2010 San Mehat <san@google.com> netd: Rename InterfaceGetInfoResult

Signed-off-by: San Mehat <san@google.com>
ommandListener.cpp
esponseCode.h
5c1b8af16dbbc20c89aaca2f93e725e12b16d055 22-Jan-2010 San Mehat <san@google.com> netd: Add Flush out enumerating/configuring interfaces

Signed-off-by: San Mehat <san@google.com>
ndroid.mk
ommandListener.cpp
ommandListener.h
esponseCode.h
ain.cpp
0399710d9a7ee575104e7d76dc988afb7829ccb9 22-Jan-2010 San Mehat <san@google.com> netd: Don't break build if BT is not available for the target

Signed-off-by: San Mehat <san@google.com>
ndroid.mk
anController.cpp
1bdac9e98c1ef37ba568b6cf23bfbc09cfe6bf15 21-Jan-2010 San Mehat <san@google.com> netd: Add preliminary support for BT PAN

Signed-off-by: San Mehat <san@google.com>
ndroid.mk
ommandListener.cpp
ommandListener.h
anController.cpp
anController.h
esponseCode.h
1881762f345d011d079ee318d31f0a8d8ee5891e 21-Jan-2010 San Mehat <san@google.com> netd: Implement tty lists and tty validation

Signed-off-by: San Mehat <san@google.com>
ppController.cpp
ppController.h
18737845d3c6a60edd6f75ac441a1b3fed6d66a7 21-Jan-2010 San Mehat <san@google.com> netd: Wait when killing tethering services

Signed-off-by: San Mehat <san@google.com>
etherController.cpp
d5573d34c8fac49e16b20cf144486125bf940086 20-Jan-2010 San Mehat <san@google.com> netd: Add support for attaching/detaching PPP daemons

Signed-off-by: San Mehat <san@google.com>
ndroid.mk
ommandListener.cpp
ommandListener.h
ppController.cpp
ppController.h
esponseCode.h
9ff78fb7da7158f5bd7c86d89a842691820259cf 19-Jan-2010 San Mehat <san@google.com> netd: Add primitive NAT control

Update: Add stub function to validate interface existance

Signed-off-by: San Mehat <san@google.com>
ndroid.mk
ommandListener.cpp
ommandListener.h
atController.cpp
atController.h
9d10b341a0ba46f108cb96e46691197d778cbc06 18-Jan-2010 San Mehat <san@google.com> netd: Plumb in the tethering interfaces

Signed-off-by: San Mehat <san@google.com>
ndroid.mk
ommandListener.cpp
ommandListener.h
esponseCode.h
etherController.cpp
etherController.h
dc.c
d18304287dbabc7835be771400b85d4ae8b63de6 15-Jan-2010 San Mehat <san@google.com> netd: Initial skelaton for netd

Signed-off-by: San Mehat <san@google.com>
ndroid.mk
ommandListener.cpp
ommandListener.h
etdCommand.cpp
etdCommand.h
etlinkHandler.cpp
etlinkHandler.h
etlinkManager.cpp
etlinkManager.h
esponseCode.h
ogwrapper.c
ain.cpp
dc.c
b79aa7a157b6b35a5944649d769fc092e5f6561c 13-Jan-2010 Nico Sallembien <nsallembien@google.com> new project, first commit