summaryrefslogtreecommitdiffstats
path: root/libsysutils/src/NetlinkEvent.cpp
Commit message (Collapse)AuthorAgeFilesLines
* libsysutil: turn on -Werror (part deux)Mark Salyzyn2014-05-011-4/+3
| | | | | | - x86_64 format warnings Change-Id: I81c2702f564bcada946f6a10f34bbf34c90f766b
* libsysutils: turn on -WerrorMark Salyzyn2014-04-301-1/+0
| | | | | | - Deal with some -Wunused / -Wunused-variable issues Change-Id: I428a0032a8743c68c97f528d5f305ba63fee1d29
* Merge commit '536dea9d61a032e64bbe584a97463c6638ead009' into HEADThe Android Open Source Project2013-11-221-0/+1
|\ | | | | | | Change-Id: I5c469a4b738629d99d721cad7ded02d6c35f56d5
| * Switch back to subsystem "net" for netlink events.Lorenzo Colitti2013-09-031-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | The change to enable address tracking via netlink incorrectly changed the subsystem of rtnetlink events from "net" to "interface". This broke interface add/delete notifications, which come from the kernel with subsystem "net". Switch back to "net" and deal with address tracking via new action codes instead of a new subsystem. Bug: 10433320 Change-Id: Ibf30efb426949dfd02304cc1d9adb1c005a539a6
| * Get rid of an infinite loop in NetlinkEvent.cpp.Lorenzo Colitti2013-08-171-8/+7
| | | | | | | | | | | | | | Bug: 10358527 Bug: 10263310 Bug: 10232006 Change-Id: I750e4bdf2000040adf214d6a772591d7bd25b350
| * Parse IP address changes in NetlinkEvent.Lorenzo Colitti2013-08-141-1/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for parsing RTM_NEWADDR and RTM_DELADDR netlink messages received on netd's netlink socket and formatting them them so NetlinkHandler can process them. Address changes are notified in subsystem "address". Interface changes, which used to be notified in subsystem "net", are now notified in subsystem "interface" to avoid confusion. Bug: 10232006 Change-Id: I93a50e8de17014e118a42f5cc0eb90a0cbfa73cc
* | Support parsing RDNSS ND options from netlink.Lorenzo Colitti2013-11-201-4/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The RDNSS options (RFC 6106) used to configure DNS servers via router advertisements are passed from the kernel to userspace via RTM_NEWNDUSEROPT netlink messages. Add code to NetlinkEvent to parse them. Also fix a compiler warning and a couple of style issues. [Cherry-pick of b185e90dcc6ac111bff908edcc6d89fd6b37dc11] Bug: 9180552 Change-Id: I6c532c8f0ceef3afdc977a431a036df398013e1a
* | Switch back to subsystem "net" for netlink events.Lorenzo Colitti2013-11-201-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change to enable address tracking via netlink incorrectly changed the subsystem of rtnetlink events from "net" to "interface". This broke interface add/delete notifications, which come from the kernel with subsystem "net". Switch back to "net" and deal with address tracking via new action codes instead of a new subsystem. [Cherry-pick of f34861346d5c207912075fba9874090e4c947869] Bug: 10433320 Change-Id: Ibf30efb426949dfd02304cc1d9adb1c005a539a6
* | Get rid of an infinite loop in NetlinkEvent.cpp.Lorenzo Colitti2013-11-201-8/+7
| | | | | | | | | | | | | | | | | | [Cherry-pick of 3984276ce47c965ad02a522280a139e0a0c7e5cf] Bug: 10358527 Bug: 10263310 Bug: 10232006 Change-Id: I750e4bdf2000040adf214d6a772591d7bd25b350
* | Parse IP address changes in NetlinkEvent.Lorenzo Colitti2013-11-201-1/+116
|/ | | | | | | | | | | | | | | This adds support for parsing RTM_NEWADDR and RTM_DELADDR netlink messages received on netd's netlink socket and formatting them them so NetlinkHandler can process them. Address changes are notified in subsystem "address". Interface changes, which used to be notified in subsystem "net", are now notified in subsystem "interface" to avoid confusion. [Cherry-pick of a4b4e9ad8e35ab424e61d76ebe6654445fc61e63] Bug: 10232006 Change-Id: I93a50e8de17014e118a42f5cc0eb90a0cbfa73cc
* Revert "libsysutils: NetlinkEvent: add support for interface xt_IDLETIMER ↵JP Abgrall2012-04-261-13/+1
| | | | | | | | | events." This reverts commit 731d831e91d5d9f8b15ca95367977abe35967166. Now that the xt_IDLETIMER uses the KOBJECT_UEVENT netlink, this change is not needed anymore.
* libsysutils: NetlinkEvent: add support for interface xt_IDLETIMER events.Ashish Sharma2012-04-111-1/+13
| | | | | | | xt_IDLETIMER events are used to infer the interface (radio) state based on a inactivity timeout value. Change-Id: I755eb54a048ca1c6ce0c646564d61188d8241851
* Remove log spamIrfan Sheriff2011-10-281-1/+0
| | | | | Bug: 5533986 Change-Id: I3d8108e2f65ce6513ac8b2d14541eaa5e4fc5da1
* NetlinkEvents: adding support for iptables' quota2 NFLOG messages.JP Abgrall2011-07-141-25/+54
| | | | | | | | | | | It passes the quota2 name and the device at the time the quota was reached. ALERT_NAME=... INTERFACE=... This needs the new kernel in which xt_quota2 can log. Change-Id: Icf5045374e1e33bdd1da0d2a2c183e70903a1fea
* Cleanup NetlinkListener and NetlinkEventMike J. Chen2011-06-231-9/+8
| | | | | | | | | | | | | To make it easier to be compatible with older existing code, use default parameters instead of separate functions for setting. Also, reintroduce the const usage that was not in the original changes by Stan. Also fix some indent spacing. Change-Id: Ice9ec7f0d5c4a0673037e2e04a764d88a98f68eb Signed-off-by: Mike J. Chen <mjchen@google.com>
* Revert "Revert "Add NETLINK_ROUTE processing to the netlink client code, so ↵Mike J. Chen2011-06-231-3/+68
| | | | | | | | | | | | | | | | | | | | | | | | that Ethernet"" This reverts commit 1d504eeb50d980c222572629383bb76315f32ca0. Conflicts: libsysutils/src/NetlinkEvent.cpp Bring back the changes from Stan Chesnutt regarding adding NETLINK_ROUTE processing. The original commit message description was: Add NETLINK_ROUTE processing to the netlink client code, so that Ethernet physical-layer up/down events can be tracked. Upper layers will use these events to enable/disable Ethernet connectivity. The original change was reverted due to an incompatiblity with Motorola's ril.so binary. I'll submit a patch to workaround that incompatiblity separately. Change-Id: I4e97ac98833b10543e654c63ecae3b9b8c7db44f Signed-off-by: Mike J. Chen <mjchen@google.com>
* libsysutils: Fix NetLinkEvent security issues.David 'Digit' Turner2011-01-191-15/+46
| | | | | | | | | | | | The issues were the following: - The code in decode() didn't handle the degenerate case where the input buffer is full of '@' - The code in decode() assumed the input buffer is properly zero-terminated. - The code in decode() would not check that it doesn't overwrite the mParams[] array. - The code in findParam() would check mParams[i] before checking the value of 'i' Also remove un-necessary calls to strlen() at runtime. Change-Id: I8acead959bd10d97c5380b08958fcb796248a010
* libsysutils: reimplement NetlinkEvent::findParam in the proper wayChih-Wei Huang2010-07-141-7/+5
| | | | | | | | The original implementation can not find correct parameters for certain cases. For example, if you have both foo_bar and foo, try to find foo may be mismatched. The correct way is to match with "=". Change-Id: I403b1a7b889583a57a4f3a14e575181ce93b10ff
* system/core: Switch libsysutils & sched_policy LOG -> SLOGSan Mehat2010-03-251-2/+2
| | | | | Change-Id: Id74c6895a8012c5915f2e259339101844de7c085 Signed-off-by: San Mehat <san@google.com>
* sysutils: Add dump() to NetlinkEventSan Mehat2009-12-241-0/+10
| | | | Signed-off-by: San Mehat <san@google.com>
* libsysutils: Fix some bugs in NetlinkListener and NetlinkEventSan Mehat2009-10-101-0/+3
| | | | Signed-off-by: San Mehat <san@android.com>
* libsysutils: Fix command argument passing bug + whitespace cleanupSan Mehat2009-05-291-2/+2
| | | | Signed-off-by: San Mehat <san@google.com>
* libsysutils: Add string.h to includesSan Mehat2009-05-071-0/+1
| | | | Signed-off-by: San Mehat <san@google.com>
* libsysutils: New C++ system convenience librarySan Mehat2009-05-061-0/+93
This library contains re-usable classes for common system level daemons. Initial consumers of this library are 'nexus' and 'vold2' Signed-off-by: San Mehat <san@google.com>