summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* am 99debfa4: am 028a3e21: libnl: build static librarystaging/cm-12.0-cafstaging/cm-12.0Colin Cross2014-02-221-1/+8
|\ | | | | | | | | * commit '99debfa4c01b49c9b470884cc56f81fcdee0fa1f': libnl: build static library
| * am 028a3e21: libnl: build static libraryColin Cross2014-02-211-1/+8
| |\ | | | | | | | | | | | | * commit '028a3e21476437685a1df497b7abac6a12f19885': libnl: build static library
| | * libnl: build static libraryColin Cross2014-02-211-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | android-clat needs a static libnl, so build a static library. To avoid building everything twice, build the static library first and then use LOCAL_WHOLE_STATIC_LIBRARIES to build a shared library. Also use LOCAL_EXPORT_C_INCLUDE_DIRS to avoid each module that builds against libnl to have to import its include dir, and remove the unnecessary LOCAL_MODULE_TAGS. Change-Id: Ib78e89e916c402787ba3f801bdf8400cbf0d784a
* | | am aee74944: am 823435f7: Merge remote-tracking branch ↵JP Abgrall2014-02-210-0/+0
|\| | | | | | | | | | | | | | | | | \'upstream_linaro/linaro-libnl2_0\' * commit 'aee749445619dd678094e416527b43d39d763bd8':
| * | am 823435f7: Merge remote-tracking branch \'upstream_linaro/linaro-libnl2_0\'JP Abgrall2014-02-21241-9794/+16414
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '823435f737de20d5ca9f4aa2ba0ae2950dbb5d4f': (159 commits) Updating group definition to follow 3.13 kernel Adding version.h Adding support for netlink API and quota in nfaccounting Compile 2.0 with Kitkat Don't include pktloc_syntax.h in BUILT_SOURCES route_obj: don't add empty destination to nlmsg automake: add ${top_builddir}/include to AM_CFLAGS Use CPPFLAGS Put preprocessor definitions in AM_CPPFLAGS add user data to change_func_t for caches Trivial fix for TBF memleak libnl: optionally disable cli tools. Ignore vim swap files Let git ignore generated pktloc source files Fix compile warning in utils.c Fix compile warning in nl.c Packet Location Interface src/nf-queue.c: cleanup and improve performance of test program for NF_QUEUE Don't install private header files. object: fix attribute comparison ...
* | | am 87470d5d: am 0021213e: am 6425fe9a: Adding support for netlink API and ↵Mathieu Poirier2014-02-210-0/+0
|\| | | | | | | | | | | | | | | | | quota in nfaccounting * commit '87470d5d06cc0a0b4624f84bbdf15b2334f4f9b9':
| * | am 0021213e: am 6425fe9a: Adding support for netlink API and quota in ↵Mathieu Poirier2014-02-210-0/+0
| |\ \ | | | | | | | | | | | | | | | | | | | | nfaccounting * commit '0021213ea39d6a889b6ed6e24dc1c2142ae175bf':
* | | | am e5e08793: am 24cf2662: Adding support for netlink API and quota in ↵Mathieu Poirier2014-02-210-0/+0
|\| | | | |_|/ |/| | | | | | | | | | | nfaccounting * commit 'e5e0879337d5bc819123152417ebf0d7968a1cec':
| * | am 24cf2662: Adding support for netlink API and quota in nfaccountingMathieu Poirier2014-02-210-0/+0
| |\ \ | | | | | | | | | | | | | | | | * commit '24cf2662b43592ab2ae8be6b30c2744e83ddff3c': Adding support for netlink API and quota in nfaccounting
* | \ \ Merge remote-tracking branch 'upstream_linaro/linaro-libnl2_0'JP Abgrall2014-02-14241-9794/+16414
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream_linaro/linaro-libnl2_0: (159 commits) Updating group definition to follow 3.13 kernel Adding version.h Adding support for netlink API and quota in nfaccounting Compile 2.0 with Kitkat Don't include pktloc_syntax.h in BUILT_SOURCES route_obj: don't add empty destination to nlmsg automake: add ${top_builddir}/include to AM_CFLAGS Use CPPFLAGS Put preprocessor definitions in AM_CPPFLAGS add user data to change_func_t for caches Trivial fix for TBF memleak libnl: optionally disable cli tools. Ignore vim swap files Let git ignore generated pktloc source files Fix compile warning in utils.c Fix compile warning in nl.c Packet Location Interface src/nf-queue.c: cleanup and improve performance of test program for NF_QUEUE Don't install private header files. object: fix attribute comparison ... Conflicts: Android.mk include/linux/netfilter/nfnetlink.h Change-Id: I383749ca16113b2ae8cfc7729aee8bbc8a36dc9e
| * | | Updating group definition to follow 3.13 kernelMathieu Poirier2014-01-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 3.13 added NFNLGRP_NFTABLES to the list of nfnetlink groups. Adding to the list in order to keep things synchronised. Change-Id: Ied34a23c3e7379c13a14e98915a072707c34bb0f Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
| * | | Adding version.hMathieu Poirier2014-01-071-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is usually autogenerated by the configure scripts but there isn't such a thing in Android. As such adding here. Change-Id: Ia4393e73358a85f4ab0b7a3f8f05cbeb8974a529 Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
| * | | Adding support for netlink API and quota in nfaccountingMathieu Poirier2014-01-072-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Adding NF ACCOUNTING subsystem as in kernel header. - Adding NF ACCOUNTING subsystem as in kernel header. - Adding accounting quota group ID. Change-Id: I86ed088f48c252739284adc4270a60925dac3f54 Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
| * | | Compile 2.0 with KitkatMathieu Poirier2014-01-073-4/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly following example set by Arik Nemtsov for Froyo. Change-Id: I4c6b56e32f8a9f80bbd224e62e26052074b428d9 Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
| * | | Don't include pktloc_syntax.h in BUILT_SOURCESThomas Graf2010-10-131-1/+0
| | | |
| * | | route_obj: don't add empty destination to nlmsgDavid Lamparter2010-10-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | don't try to give the kernel an empty RTA_DST attribute. this would previously happening on trying to delete the default route as returned from the kernel. the kernel doesn't add a RTA_DST atttribute, so libnl does nl_addr_alloc(0) and inserts a zero-length RTA_DST attribute into the deletion request, which the kernel then refuses with ERANGE. Signed-off-by: David Lamparter <equinox@diac24.net>
| * | | automake: add ${top_builddir}/include to AM_CFLAGSAndreas Bießmann2010-10-133-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables out-of-source builds like this $ cd builddir && src_dir/configure && make Before this patch there was an error about missing netlink/version.h which is built by automake in top_builddir rather than top_srcdir which is already in include search path. Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
| * | | Use CPPFLAGSThomas Graf2010-10-131-1/+1
| | | |
| * | | Put preprocessor definitions in AM_CPPFLAGSMatthew L. Creech2010-10-132-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an alternate kernel header include directory is added in CPPFLAGS, the libnl build fails. This is because the local copy of kernel headers is added in AM_CFLAGS, which gets included after CPPFLAGS in the automake-generated makefile. Switching to AM_CPPFLAGS fixes the problems.
| * | | add user data to change_func_t for cachesAndreas Fett2010-10-134-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the patch below adds the possibility to pass user data to callbacks of type change_func_t when using the nl_cache_mngr_* family of functions. If there is any better way to do this, without duplicating the code in cache_mngr.c please let me know.
| * | | Trivial fix for TBF memleakDenys Fedorysychenko2010-10-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this patch, running alloc / free cache loop will lead to huge memory leaks on machine with 3000 interfaces with tbf qdiscs. Here was valgrind output: ==5580== 18,070,728 bytes in 347,514 blocks are definitely lost in loss record 32 of 32 ==5580== at 0x4025485: calloc (in /lib/valgrind/vgpreload_memcheck-x86- linux.so) ==5580== by 0x405F410: tbf_msg_parser (tbf.c:46) ==5580== by 0x405302B: qdisc_msg_parser (qdisc.c:119) ==5580== by 0x4033DC9: nl_cache_parse (cache.c:643) ==5580== by 0x4033E7C: update_msg_parser (cache.c:460) ==5580== by 0x4038A11: nl_recvmsgs (netlink-local.h:112) ==5580== by 0x4034175: __cache_pickup (cache.c:483) ==5580== by 0x40343FF: nl_cache_pickup (cache.c:516) ==5580== by 0x403447D: nl_cache_refill (cache.c:698) ==5580== by 0x4034AB7: nl_cache_alloc_and_fill (cache.c:198) ==5580== by 0x4053216: rtnl_qdisc_alloc_cache (qdisc.c:388) ==5580== by 0x80489DB: main (in /home/root/nltest) Patch complied and tested for same test case, no more leaks anymore.
| * | | libnl: optionally disable cli tools.Karl Hiramoto2010-10-132-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compile and link time can reduced, most non-developers don't need these cli tools. ./configure --disable-cli time make real 0m40.485s user 0m33.784s sys 0m2.793s ./configure time make real 0m53.097s user 0m42.077s sys 0m4.396s Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
| * | | Ignore vim swap filesThomas Graf2010-07-031-0/+1
| | | |
| * | | Let git ignore generated pktloc source filesThomas Graf2010-07-031-0/+4
| | | |
| * | | Fix compile warning in utils.cThomas Graf2010-07-031-1/+1
| | | |
| * | | Fix compile warning in nl.cThomas Graf2010-07-032-2/+2
| | | |
| * | | Packet Location InterfaceThomas Graf2010-07-0213-5/+475
| | | |
| * | | src/nf-queue.c: cleanup and improve performance of test program for NF_QUEUEKarl Hiramoto2010-04-191-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix filename in file header * If the kernel or netlink socket becomes over loaded, the kernel starts printing error messages like: nf_queue: full at 1024 entries, dropping packets(s). Dropped: 1 nf_queue: full at 1024 entries, dropping packets(s). Dropped: 2 nf_queue: full at 1024 entries, dropping packets(s). Dropped: 3 So detect out of order packet ID's and set the NF_ACCEPT verdictÂ, so they will be removed from the kernel queue. * increase socket buffer to improve performance without these changes sending more than 100 KB/s over tcp HTTP lo(localhost) was difficult on my core2 duo machine, due to so many dropped packets. After these changes over 150 MB/s was easy. * improve help text Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
| * | | Don't install private header files.Thomas Graf2010-04-191-5/+1
| | | |
| * | | object: fix attribute comparisonPatrick McHardy2010-04-191-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently two attributes are regarded as different if they are absent in both objects to be compared. This is obviously incorrect, change to regard objects as different if an attribute is only present on one of them or if the attribute data differs. Signed-off-by: Patrick McHardy <kaber@trash.net>
| * | | Fix rule attribute comparisonPatrick McHardy2010-04-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rules don't have unique identifiers, so all attributes are compared by initializing the ID mask to ~0. This doesn't work however since nl_object_identical verifies whether the ID attributes are actually present before comparing the objects, which is never the case. Work around by using the intersection of present attributes when comparing two rule objects. Signed-off-by: Patrick McHardy <kaber@trash.net>
| * | | addr: add NL_DUMP_ENV functionPatrick McHardy2010-04-191-0/+76
| | | | | | | | | | | | | | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
| * | | addr: restore anycast functionsPatrick McHardy2010-04-192-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | Seems it got lost during some cleanups. Signed-off-by: Patrick McHardy <kaber@trash.net>
| * | | neigh: fix id_attrs to include ifindexPatrick McHardy2010-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Neighbour entries for the same destination may exist on multiple interfaces. Include the interface in the ID attributes. Signed-off-by: Patrick McHardy <kaber@trash.net>
| * | | cache: properly invoke change_cb for deleted objects in nl_cache_resync()Patrick McHardy2010-04-191-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When resyncing a cache, there are no delete messages, so they need to be synthesized for deleted objects. Signed-off-by: Patrick McHardy <kaber@trash.net>
| * | | Fix a bug when calculating ticks_per_usecJose Ignacio Naranjo Hernández2010-03-101-19/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've noticed a wrong behavior when setting up some delays in a netem qdisc. I will try to make the things easier for the reader describing the calls path. To set up a delay (or jitter...) I use 'rtnl_netem_set_delay' which requires an int parameter that tells the delay in micro seconds. Inside this func, the delay is set up with the help of 'nl_us2ticks', which is just an arithmetic operation (us * ticks_per_usec), where us is the input parameter and ticks_per_usec is a global variable initialized in 'get_psched_settings'. And here is the problem: If this variable is going to be calculated using '/proc/net/psched', I think the file scan is not done properly. I don't understand what the meaning of the asterisk is here: int r = fscanf(fd, "%08x%08x%08x%*08x", &tick, &us, &nom); if (4 == r && nom == 1000000 && !got_tick) ticks_per_usec = (double)tick/(double)us; The execution path never gets in the if statement, because r is always 3, and if the fourth parameter is read (avoiding the asterisk), there is no variable to store it in, so it comes a segv. In my opinion we can get rid of the if statement, because I think the proc psched file has always a fixed format of 4 parameters, and 'nom' is always 1000000 (http://lxr.linux.no/#linux+v2.6.32/net/sched/sch_api.c#L1678). Find attached a patch I did, if I am correct.
| * | | new function nfnl_queue_msg_send_verdict_payload()Karl Hiramoto2010-03-103-1/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nfnl_queue_msg_send_verdict_payload() will to send the verdict, mark, and possibly changed payload through the netlink socket. Add a few docbook comments in other funcs. Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
| * | | new feature nl_send_iovec(), nl_auto_complete() and code refactoring.Karl Hiramoto2010-03-102-24/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create new function nl_send_iovec() to be used to send multiple 'struct iovec' through the netlink socket. This will be used for NF_QUEUE, to send packet payload of a modified packet. Refactor nl_send() to use nl_send_iovec() sending a single struct iovec. Create new function nl_auto_complete() by refactoring nl_send_auto_complete(), so other functions that call nl_send may also use nl_auto_complete() Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
| * | | CLI - Command Line Interface LibraryThomas Graf2009-12-1671-1401/+1446
| | | | | | | | | | | | | | | | | | | | Moved common code in src/ used by CLI tools to src/lib/ for possible use by other CLI tools. Just link to libnl-cli.{so|la}
| * | | one more fix, u32.cDenys Fedoryschenko2009-12-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | One more segfault, also nl-tctree-list , fix Probably need reformat for better look Patch attached
| * | | invalid comma cause segfault for nl-tctree-list, tbf.cDenys Fedoryschenko2009-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | I notice segfault while running nl-tctree-list for tbf qdisc. Patch that fix this typo is attached.
| * | | libnl: add ERANGE to errno translationPatrick McHardy2009-11-101-0/+1
| | | | | | | | | | | | | | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
| * | | libnl: fix automake breakagePatrick McHardy2009-11-102-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libnl-route must be handled before libnl-nf in lib_LTLIBRARIES since the later depends on the former. Additionally nf-monitor, nl-list-caches, nl-list-sockets and nl-util-addr have been dropped from the Makefile. Signed-off-by: Patrick McHardy <kaber@trash.net>
| * | | - Compile with _GNU_SOURCEThomas Graf2009-09-032-3/+3
| | | | | | | | | | | | | | | | - Fixed classifier.c -> cls.c
| * | | Merge branch 'master' of git://dev.medozas.de/libnlThomas Graf2009-09-0220-1564/+264
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: lib/Makefile src/Makefile
| | * | | build: make use of library dependenciesJan Engelhardt2009-07-052-25/+28
| | | | |
| | * | | Move to automake-based buildJan Engelhardt2009-06-2320-1559/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issues solved: * PACKAGE_VERSION was abused for SOVERSION * unneeded DEP stage * did not support out-of-tree builds * no way to turn off silent mode * overriding CFLAGS at make time was not supported * no static libs were provided Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * | | | Add support for getting and deleting queueing classes.olc2009-09-022-0/+83
| | | | |
| * | | | Fix rtnl_addr cachingDan Winship2009-09-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | addr_obj.ops.oo_id_attrs included ADDR_ATTR_PEER, so any address that didn't have a peer address set would compare as unequal to itself, meaning it could never be removed from a cache after it was added, etc.
| * | | | Patch for unexpectedly aligned messagesMarc de Kruijf2009-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found the following bug, where nlmsg_ok() in lib/msg.c would incorrectly return 'true' when the input argument 'remaining' was a negative number. This happens when the message is not aligned the way that libnl expects (although it is still legal). In the comparison of the signed and unsigned numbers on line 284, the signed number gets converted to an unsigned number, which is unexpected and naturally produces a bug. My patch is below. The cast is ugly, but it fixes the problem.