History log of /system/connectivity/shill/external_task.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5 03-Sep-2015 Peter Qiu <zqiu@google.com> License shill to Apache2

This patch automatically replaced the license on all text files from
Chromium OS (BSD style) to AOSP (Apache2), keeping the original year as
a reference.

The license header was added to .gyp and .gypi, the NOTICE was added with a copy
of the Apache2 license and MODULE_LICENSE_* file was added.

BUG=23587594
TEST=grep 'Chromium OS Authors' doesn't find anything.

Change-Id: If41ede586c2465f5831fb7fee270ff41dbfdb596
/system/connectivity/shill/external_task.cc
a24480aaca4d392d6d08cebdc508ee49615839d3 12-Aug-2015 Peter Qiu <zqiu@chromium.org> shill: ExternalTask: use ProcessManager to manage processes

This removes glib dependency for spawning/monitoring processes
for external tasks.

This is a part of series CLs that convert shill over to MessageLoopForIO
and chromeos dbus.

BUG=chromium:516841
TEST=unittests

Change-Id: I6cec2326671bf0da09cd8ec7731b5c510cbed0ed
Reviewed-on: https://chromium-review.googlesource.com/292982
Commit-Ready: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
Reviewed-by: Zeping Qiu <zqiu@chromium.org>
/system/connectivity/shill/external_task.cc
a794cd60a7339d576ea2eed263a4f0a20fb255af 16-Jun-2015 Paul Stewart <pstew@chromium.org> shill: Top-level files a-e: Switch pointer/ref spacing

Switch to Chrome style spacing.

BUG=chromium:501026
TEST=Unit tests

Change-Id: Idb7252202e142098999fe0672712aded7d369259
Reviewed-on: https://chromium-review.googlesource.com/278038
Reviewed-by: Rebecca Silberstein <silberst@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/external_task.cc
34f424e672439bdf237a755f85245ebd7b66e8e2 17-Jan-2015 Paul Stewart <pstew@chromium.org> shill: Error: Attribute source from PopulateAndLog

Have callers pass the source file/line of PopulateAndLog calls so
the log message can disambiguate the ultimate source of the error.

BUG=chromium:449528
TEST=Unit tests + manual: restart shill and "grep error.cc /var/log/net.log"

Change-Id: I7bb54e966b047025a3ec7ef18acce5b8bed3d031
Reviewed-on: https://chromium-review.googlesource.com/241522
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/external_task.cc
cd47732488cd101eaf0d3558dde5a7d4e4fc260b 17-Oct-2014 Ben Chan <benchan@chromium.org> shill: Replace scoped_ptr with std::unique_ptr.

BUG=None
TEST=`USE='wimax' FEATURES=test emerge-$BOARD shill`
TEST=`USE='wimax clang asan' FEATURES=test emerge-$BOARD shill`

Change-Id: Id9737d9a9c75ecb6abb466b5559ff06dcf0751cd
Reviewed-on: https://chromium-review.googlesource.com/224138
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
/system/connectivity/shill/external_task.cc
cc225ef3b77b5e098cc12c661a947e1737480777 30-Sep-2014 Ben Chan <benchan@chromium.org> shill: Replace NULL with nullptr.

BUG=None
TEST=`USE=wimax FEATURES=test emerge-$BOARD shill`

Change-Id: I30ab47ff32dcadad09ae7a2baf4d4123a6ef0d8e
Reviewed-on: https://chromium-review.googlesource.com/220657
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
/system/connectivity/shill/external_task.cc
c4f9aa0e795b6f79c628a763831d4dc6c01fb72b 16-Aug-2013 mukesh agrawal <quiche@chromium.org> shill: provide ability to configure children to terminate with parent

If shill crashes and restarts, it will re-initialize its state about
its peer daemons (e.g. wpasupplicant, ModemManager). Child processes,
however, do not always provide a way to query their current state.

For dhcpcd, we deal with this problem by having the child process
(dhcpcd) monitor D-Bus events to determine when shill exits. When
that occurs, dhcpcd terminates itself. In this way, a newly spawned
shill process doesn't have to worry about an old dhcpcd conflicting
with one fired off by the (new) shill process.

Since pppd doesn't have integrated D-Bus support, doing the same
for pppd could be hairy. Instead, use prctl() to ask the kernel
to deliver SIGTERM to pppd when shill exits.

BUG=chromium:261710
TEST=manual

Manual test
-----------
- plug in ppp dongle
- wait for network to connect
- killall -9 shill
- egrep 'pppd.+Terminating on signal 15' /var/log/net.log

Change-Id: I7513ccfa8de0b154d233d8a4d6f1bc701af32974
Reviewed-on: https://gerrit.chromium.org/gerrit/66031
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
/system/connectivity/shill/external_task.cc
9da07771df3dbbc99ff99114c26317d01f29f7fc 15-May-2013 mukesh agrawal <quiche@chromium.org> shill: support 3G dongles with PPP interface

Assuming the 3G dongle has been switched to modem mode (with
usb_modeswitch or similar), and an activated SIM is present,
shill will automatically connect to the cellular network.

The primary change, as far as the Cellular/Modem logic goes,
is that we take the absence of a link name to mean that the
modem is a PPP dongle. Instead of bailing out, we create the
Cellular object, and register it with the manager as any other
Cellular device.

When the Cellular connection is complete, CellularCapabilityUniversal
checks the Bearer's IPConfig method, as indicated by modemmanager1.
If the method is specified as PPP, the capability asks the Cellular
device to start PPP.

When PPP setup completes, Cellular passes the IP configuration
information to the PPPDevice. At that point, the PPPDevice is
assigned an IP address, and routing is updated appropriately.

Notable changes:
- Moved VPN to VirtualDevice, changed OpenVPNDriver to use it,
created a new subclass PPPDevice.
- Moved PPP code out of L2TPIPSecDriver, and into PPPDevice.
- Changed L2TPIPSecDriver to use PPPDevice.

While there:
- Got rid of VPNDriver::OnDisconnected, and changed callers to
use DropConnection instead.
- Made Load and Save of VirtualDevices no-ops. This eliminates
the confusingly named "device_" stanzas in the default profile.
We lose VPN byte counts by doing this, but they weren't sensible
anyway (they'd be shared across potentially different VPNs).

New units will follow in another CL (TBW).

BUG=chromium:240051
TEST=unit tests, manual

Manual testing
--------------
1. Get 3G PPP dongle.
2. Install activated SIM.
3. Plug dongle into USB port.
4. Wait for the dongle to switch to modem mode.
(I used a manually installed usb_modeswitch, but this will
soon be handled by mist.)
5. Wait for the dongle to connect. With the Huawei E303, this
takes about 35 seconds.

Change-Id: I916bef451ee6e8dcf1af8135ecf6787251acf19b
Reviewed-on: https://gerrit.chromium.org/gerrit/51356
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
/system/connectivity/shill/external_task.cc
ae30e9e4f9050a5a2c3b18d20f8bd23f20aa8f38 28-May-2013 mukesh agrawal <quiche@chromium.org> shill: create external_task abstraction

This moves code out of L2TPIPSecDriver into a new ExternalTask
class, and updates the L2TPIPSecDriver code appropriately.

While there:
- fix a couple bug in L2TPIPSecDriverTest::ExpectInFlags.
(The function was returning early, and not checking the value
of the flag.)
- remove RpcTask::GetRpcInterfaceIdentifier, since the only
place it was called from was a test.

BUG=chromium:209938
TEST=unit tests, manual

Manual test
-----------
- connect to CrOS_WPA2_Buffalo2_AG300H_2.4GHz
- /usr/local/lib/flimflam/test/connect-vpn l2tpipsec-psk \
Cisco-ASA-173 172.22.22.173 \
Cisco-ASA-173 chromeos_psk \
CrOS_Password <password>
- check that ppp0 has an IP address
- egrep "l2tpipsec_vpn.+pppd: local" /var/log/net.log
(should match)

Change-Id: I54aed25f14597d0324249aaddba2095d296ded7d
Reviewed-on: https://gerrit.chromium.org/gerrit/57193
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
/system/connectivity/shill/external_task.cc