History log of /system/connectivity/shill/net/rtnl_handler.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/net/rtnl_handler.cc
583dafa85bfc0ee199fe61c6af642587d8aa3f8e 22-Jul-2015 Garret Kelly <gdk@chromium.org> shill: add kRequestBridgeNeighbor dump mode to RTNLHandler

Add kRequestBridgeNeighbor dump mode to RTNLHandler::RequestDump. This
will cause the AF_BRDIGE-family forwarding database (FDB) to be dumped.

BUG=chrome-os-partner:42769
TEST=FEATURES=test emerge-amd64-generic shill

Change-Id: I514e7ae7f61ba738d6ddae59d1630d1472836f23
Reviewed-on: https://chromium-review.googlesource.com/286000
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Garret Kelly <gdk@chromium.org>
Tested-by: Garret Kelly <gdk@chromium.org>
/system/connectivity/shill/net/rtnl_handler.cc
e67a78539a05ea7fc68ed5ca18f6d1de333a3086 16-Jun-2015 Paul Stewart <pstew@chromium.org> shill: net: Switch pointer/ref spacing

Switch to Chrome style spacing.

BUG=chromium:501026
TEST=Unit tests

Change-Id: Ice57438655da8f177e5a8aa6fd602779ba21c357
Reviewed-on: https://chromium-review.googlesource.com/278075
Reviewed-by: Rebecca Silberstein <silberst@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/net/rtnl_handler.cc
21a567fd6ef3ec87386db9c119d411f13399fe95 12-Jun-2015 Paul Stewart <pstew@chromium.org> shill: RTNLHandler: Ignore ENODEV in SetInterfaceFlags

Ignore ENODEV ("No such device") if asked to bring an interface
down (IFF_UP flag is not set) in SetInterfaceFlags. This allows
error-free operation when an unplugged device is being cleaned
up.

BUG=chromium:498908
TEST=Unit tests (for regressions)
TEST="rmmod asix; modprobe asix; grep 'No such device' /var/log/messages"
TEST="/usr/local/lib/flimflam/test/disable-device eth0"
TEST=Make sure "UP" flag does not appear in output of "ifconfig eth0"

Change-Id: Ie3ba41554d2c295e8ce3fc26861268c9c481443d
Reviewed-on: https://chromium-review.googlesource.com/277137
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/net/rtnl_handler.cc
24e87c1c48919b37456c7087e358ea4bd281c892 11-Jun-2015 Paul Stewart <pstew@chromium.org> shill: RTNLHandler: Mask known errors

Create a concept of an error mask -- a list of errno values that
are are considered benign for a given RTNL method call. Maintain
window of these error masks for the last N most recent sequence
numbers sent to the kernel. On receipt of an error response,
only send a LOG(ERROR) (visible in /var/log/messages) if this
error is not anticipated by the error mask.

Use this facility to create a variant of SendMessage() that
inspects the outgoing message request and assigns a default
error mask -- for example an "Add" request that receives an
EEXIST ("already exists") error is benign with respect to
method calls that just wish that this entry exist.

Use this new facility to make routing and address requests
silent in the face of requests that fail because the work
is already essentially done.

While here, make the normal processing of incoming and
outgoing RTNL messages at a less verbose level, since
libshill-net doesn't use context-specific logging.

BUG=chromium:498908
TEST=New unit tests (for regressions) + Manual:
TEST=restart shill; grep "shill.*rtnl" /var/log/messages

Change-Id: I9b4a9ae579dd34935a9c269979668dc569728790
Reviewed-on: https://chromium-review.googlesource.com/276739
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/net/rtnl_handler.cc
da86578bc413a76eca81903c42e0123420df4caa 13-Apr-2015 Nathan Bullock <nathanbullock@google.com> shill: Pass groups to RtnlHandler.Start

Allow clients of the RtnlHandler to explicitly define which groups
they want to listen to. This will allow more flexibility in the clients
without causing everyone to have to listen to all groups.

BUG=none
TEST=FEATURES=test emerge-$BOARD apmanager shill

Change-Id: I2682f6bcfda3a50dade2d1a2b34a2bc1254d7fde
Reviewed-on: https://chromium-review.googlesource.com/265460
Reviewed-by: Nathan Bullock <nathanbullock@google.com>
Commit-Queue: Nathan Bullock <nathanbullock@google.com>
Tested-by: Nathan Bullock <nathanbullock@google.com>
/system/connectivity/shill/net/rtnl_handler.cc
af19870a5717a0a9f05c4fd957d4a05f48b8b090 09-Apr-2015 Alex Deymo <deymo@chromium.org> Use PLOG instead of LOG with strerror()

This patch replaces "LOG() << ... << strerror(errno)" by "PLOG() << ..."
when possible, which provides equivalent functionality.

BUG=None
TEST=cbuildbot amd64-generic-full

Change-Id: I760689818a3647efa980c96305a0bc8cf0bb4ac0
Reviewed-on: https://chromium-review.googlesource.com/264834
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
/system/connectivity/shill/net/rtnl_handler.cc
ad576bffebd92b9adf42ea6b9e43515169787cee 11-Mar-2015 Garret Kelly <gdk@chromium.org> shill: add neighbor handling to the RTNL abstraction

Add handling for neighbor messages to the rtnetlink abstraction.
Include support for adding and removing neigbors, as well as performing
dump requests for the complete neighbor set.

BUG=chrome-os-partner:37804
TEST=FEATURES=test emerge-amd64-generic shill

Change-Id: I0d40d49ac64d1b997186f5ce65b7d3e39dfb4f27
Reviewed-on: https://chromium-review.googlesource.com/258920
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Garret Kelly <gdk@chromium.org>
Tested-by: Garret Kelly <gdk@chromium.org>
/system/connectivity/shill/net/rtnl_handler.cc
024a6c80bc8474d828af6d961ea7fe0d67d69587 23-Jan-2015 Paul Stewart <pstew@chromium.org> shill: Connection: Apply connection MTU

Honor the "mtu" field in IPConfig::Properties by applying this
MTU to the interface. Apply a default MTU to interfaces that
do not specify one, and a minimum MTU if the supplied MTU will
not work for the connected IP configuration.

BUG=chromium:450759
TEST=Unit tests, Upcoming test network_DhcpMTU (CL:243315)

Change-Id: Ie7abf937b8475d43e5a77bf9f27ec58a5433fc2a
Reviewed-on: https://chromium-review.googlesource.com/243370
Reviewed-by: Prabhu Kaliamoorthi <kaliamoorthi@chromium.org>
Reviewed-by: Zeping Qiu <zqiu@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/net/rtnl_handler.cc
6d856a6df7f112a84a5799d66a36b7b5d6bb3e50 14-Jan-2015 Peter Qiu <zqiu@chromium.org> shill: create Sockets object in RTNLHandler

Create and maintain Sockets object in RTNLHandler to prevent the
possibility of Sockets object being destructed before RTNLHandler.

BUG=chromium:448823
TEST=USE="asan clang" FEATURES=test emerge-$BOARD shill apmanager
Verify we still have network connectivity through shill
Verify apmanager doesn't seg fault when exiting

Change-Id: I3a60068718ba6c547cef1437aa1fec22bd27e3eb
Reviewed-on: https://chromium-review.googlesource.com/240801
Trybot-Ready: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
/system/connectivity/shill/net/rtnl_handler.cc
7e8b8ee34816575b9059dd041ef29f91fe1d15c8 25-Nov-2014 Peter Qiu <zqiu@chromium.org> shill: add support for allowing remote dbus service to claim/release devices

Add method ClaimInterface and ReleaseInterface to DBus interface
org.chromium.flimflam.Manager to allow remote DBus service to claim
the ownership of network interfaces from shill.

To reduce complexity, this service will only support one DBus service at a
time, which means disallow a DBus service from claiming interface from shill
if another DBus service currently had ownership to one or more interfaces
from shill.

When an interface is claimed by a remote DBus service, shill will stop any
activities on that interface, deregister it from the manager if it is
registered, and put it in the blacklist to avoid any further usage. Once the
interface is released by the remote DBus service, it will be removed from the
blacklist and a new device will be created/registered when it is detected
through RTNL.

BUG=chromium:435704
TEST=unittests, manual test will be done using apmanager.

Change-Id: Ie01945f083910345d4cbe9e1d2e64711b5d60891
Reviewed-on: https://chromium-review.googlesource.com/231930
Reviewed-by: Peter Qiu <zqiu@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
Tested-by: Peter Qiu <zqiu@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/net/rtnl_handler.cc
cddd2d09878704128d35ddfeec862109b7d7fdc9 11-Nov-2014 Alex Deymo <deymo@chromium.org> Include the implemented header first in all projects.

The Google C++ style guide dictates that foo.cc and foo_unittest.cc
should include foo.h in the first place, so missing headers in foo.h
are detected with a compile error of the module implementing them and
not when another module uses them.

This CL sweeps across all the .cc file in platform2 enforcing this.

BUG=None
TEST=cbuildbot amd64-generic

Change-Id: I41835835caba13f54c3c844ecf552eb0e47efa9d
Reviewed-on: https://chromium-review.googlesource.com/228894
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
/system/connectivity/shill/net/rtnl_handler.cc
40a014862d79843026e06ef0cc0e3bc1463fe518 31-Oct-2014 Peter Qiu <zqiu@chromium.org> shill: remove glib dependency from libshill-net

Pull glib's IO handlers out from libshill-net to eliminate its dependency
on glib. This is desired since the applications that uses this library
might not want this extra dependency.

This is achieved by adding an IOHandlerFactoryContainer for setting/accessing
IOHandlerFactory. By default. the container will create an IOHandlerFactory
that create IOHandlers base on the libbase's FileDescriptorWatcher. The caller
can implement its own IOHandlerFactory and IOHandlers to overwrite this default
behavior. For example, shill's glib IOHandlers.

BUG=chromium:427982
TEST=unittests, run wifi_matfunc for shill regression test

Change-Id: I92b853309d520f499b9bb2736211cdd3bb3c268f
Reviewed-on: https://chromium-review.googlesource.com/226833
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
Tested-by: Peter Qiu <zqiu@chromium.org>
/system/connectivity/shill/net/rtnl_handler.cc
3161caa04e98af2fec2106d80c5d2e2b2f809366 29-Oct-2014 Peter Qiu <zqiu@chromium.org> shill: Remove shill::Error dependency from libshill-net shared library.

Update the ErrorCallback in the IOHandler to pass back a std::string
(error message) instead of shill::Error objet to remove the dependency
of shill:: Error from the libshill-net library, which also allow it to
remove the dependency for dbus-c++.

BUG=chromium:427982
TEST=unittests

Change-Id: I2e756d5e0744f449fcdcb157f5356112c45fd855
Reviewed-on: https://chromium-review.googlesource.com/226291
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Peter Qiu <zqiu@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
Tested-by: Peter Qiu <zqiu@chromium.org>
/system/connectivity/shill/net/rtnl_handler.cc
8d6b59704591ba9fad57751858835dc332dbdd37 28-Oct-2014 Peter Qiu <zqiu@chromium.org> shill: export a shared library for RTNL interface.

Export a shared library "libshill-net-<(libbase-ver)" from shill, which
currently includes the RTNL interface and other codes that it depends on
(mainly ByteString, IPAddress, IOHandler, TimeStamp, and Sockets). All the
library codes are moved to under "shill/net/".

Upcoming changes:
- Remove dependency for "shill/error.h" which depends on dbus-c++.
- Add Netlink interface to the shared library.

BUG=chromium:427982
TEST=unittests
CQ-DEPEND=CL:226103

Change-Id: I7f5c183b8a347c02e80ffed5e3497f691dde517c
Reviewed-on: https://chromium-review.googlesource.com/226110
Reviewed-by: Peter Qiu <zqiu@chromium.org>
Tested-by: Peter Qiu <zqiu@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
/system/connectivity/shill/net/rtnl_handler.cc