0190ad35aa672f8e9147ebfcfd6bbeb3c7d2fe62 |
|
15-Oct-2015 |
Garret Kelly <gdk@google.com> |
shill: don't truncate sequence numbers Both when handling NetlinkPackets and when managing the pending dump sequence number shill has previously truncated the 32bit netlink sequence to a uint16_t. This causes issues where the untruncated sequence is used as the key in the map of handlers, meaning that the handler never gets invoked and the messages are then treated as if they were broadcast messages. Bug: None BUG=chrome-os-partner:46556 TEST=created a program that issued more than 2^16-1 dump requests Change-Id: I2d68cd61d5de4cefd50a1f229e4dc5f08cab77ee
/system/connectivity/shill/net/netlink_packet.h
|
1da9419d10a1a617cc634e79772335fa08b3420f |
|
10-Sep-2015 |
Peter Qiu <zqiu@google.com> |
shill: libshill-net: remove external header dependency Move shill_export.h to net/ so that it will be installed by the library. Also remove the unnecessary header dependency for shill/accessor_interface.h in event_history.h. Bug: 23587594 TEST=FEATURES=test emerge-$BOARD shill Change-Id: Ia0d79e6945bfd27895b534706559d2f47051052a Reviewed-on: https://chromium-review.googlesource.com/298262 Commit-Ready: Zeping Qiu <zqiu@chromium.org> Tested-by: Zeping Qiu <zqiu@chromium.org> Reviewed-by: Paul Stewart <pstew@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org>
/system/connectivity/shill/net/netlink_packet.h
|
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/netlink_packet.h
|
979f851096ba2e4251d8beba2f7fc20d27a0cac3 |
|
28-Jul-2015 |
Paul Stewart <pstew@chromium.org> |
shill: NetlinkAttribute: Parse nlattr values Parse netlink attributes directly in NetlinkAttribute and NetlinkAttributeList. Packing and unpacking "tb" and "policy" data structures and calling nla_parse() and friends doesn't add any value, since NetlinkAttribute already has its own scheme (NestedData) for specifying type validation and custom decoding. The back-end for this refactor is a new IterateAttributes method written in AttributeList that walks an incoming payload to present each nlattr type and a ByteString containing the attribute payload. This means that all NetlinkAttribute types needed to be refactored to use "const ByteString&" for initialization. This CL also contains a few small fix-ups to unit tests (a couple missing ResetConsumedBytes() calls) and adds unit tests for IterateAttributes and the refactor of string validation over to NetlinkStringAttribute. CQ-DEPEND=CL:*224915 BUG=chromium:512152 TEST=Unit tests Change-Id: I416464dd928a4c8e024267d2e20234190995771b Reviewed-on: https://chromium-review.googlesource.com/289228 Reviewed-by: mukesh agrawal <quiche@chromium.org> Commit-Queue: Paul Stewart <pstew@chromium.org> Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/net/netlink_packet.h
|
b5b41b5ce5d06e9df1dbd7f319cc49ff982eb84e |
|
24-Jul-2015 |
Paul Stewart <pstew@chromium.org> |
shill: NetlinkManager: Use NetlinkPacket for incoming data Create NetlinkPacket instances for dispatching incoming netlink frames. As opposed to raw nlmsghdr pointers, NetlinkPacket objects can persistently contain both the bounds of the packet (since it is contained in a ByteString) as well as a counter for the data consumed from the payload so far. Use of this new data structure also resolves some tricky issues about "constness" with regards to the data passed to the NetlinkMessage. Previously, the code had a number of instances of "const_cast". Although NetlinkPacket objects are passed via non-const pointer, the class itself does not provide any non-const methods apart from those related to the consumption of data out of the payload. As a result, we have a reasonable guarantee that there will not be any non-obvious modification of either headers or payload as it is being processed. For purposes of unit tests which do have cases for header and payload modification, a MutableNetlinkPacket object is introduced to supply those needs in a manner that does not expose NetlinkPacket further. All NetlinkMessage objects have been converted to use this new datatype. BUG=chromium:512152 TEST=Unit tests Change-Id: I07180d8dcc70852998920fdbe97f9ef1511c1b2b Reviewed-on: https://chromium-review.googlesource.com/287913 Reviewed-by: mukesh agrawal <quiche@chromium.org> Commit-Queue: Paul Stewart <pstew@chromium.org> Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/net/netlink_packet.h
|
60173848f6898f03e92add2c91880294946b0da4 |
|
21-Jul-2015 |
Paul Stewart <pstew@chromium.org> |
shill: NetlinkPacket: Add new object for netlink messages Create a new object type for retrieving a netlink message from a byte buffer, and consuming data from the payload. This will be the primary method for passing around netlink packet data. It will also be used to replace netlink parsing in the future. BUG=chromium:512152 TEST=New unit test Change-Id: I21d91162af69a7e80e519d52b5fdfc1c00aee9ed Reviewed-on: https://chromium-review.googlesource.com/287198 Reviewed-by: Samuel Tan <samueltan@chromium.org> Commit-Queue: Paul Stewart <pstew@chromium.org> Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/net/netlink_packet.h
|