Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Mar 19, 2015
  1. utils: add code comment about capability number assignment

    authored
    Also reserve a range of capabilities (0x7000 to 0x7FFF) that we won't
    use upstream. Add a macro NL_CAPABILITY_IS_USER_RESERVED() to check
    if the capability is in that range.
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
Commits on Mar 18, 2015
  1. build: extend configure option --enable-cli and install all cli programs

    authored
    Previously, some cli programs were installed to sbin/
    and most were not installed at all.
    
    Now, by default install all of them to bin/ directory.
    But extend the configure option to allow specifying
    'no-inst', 'bin', or 'sbin'.
    
    Acked-by: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  2. build/trivial: sort PROGRAMS list in src/Makefile.am

    authored
    Signed-off-by: Thomas Haller <thaller@redhat.com>
Commits on Mar 17, 2015
  1. route: remove unnecessary include of private linux/if.h

    David Chappelle authored committed
    Including linux/if.h in netlink/route/link.h causes issues
    in cases where libnl is used in conjuntion with other third
    party libraries that include net/if.h. Seems to be a long
    checkered history of symbol collisions between these two
    files. As it turns out, including linux/if.h from within
    netlink/route/link.h is actually unecessary. I resurrected
    a forgotten path from this thread:
    
        http://lists.infradead.org/pipermail/libnl/2012-April/000525.html
    
    By removing the include as the patch suggests we can get
    around the nuissance of the symbol collisions.
    
    #73
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
Commits on Mar 9, 2015
  1. build: revert moving unstable symbols from libnl_3 linker section

    authored
    In the past, libnl3 had only one section (libnl_3) in the
    linker version script. Between 3.2.25 and 3.2.26 release,
    this was cleaned up and new symbols were added to libnl_3_2_26
    section. Commit d2a30fb also moved new symbols since 3.2.25
    to that section.
    
    Fedora 21 and later already uses these symbols in the previous
    version (@libnl_3). Updating there would break symbol lookup.
    
    As we have users of the unstable version from pre-3.2.26, move
    those symbols back. Note that this now breaks unstable users since
    d2a30fb (5 weeks ago) -- which probably are much fewer affected
    users.
    
    Fixes: d2a30fb
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
Commits on Mar 6, 2015
  1. lib/socket: detect protocol in nl_socket_set_fd()

    authored
    With support for socket option SO_PROTOCOL we don't need the protocol
    argument to nl_socket_set_fd(). Maybe we should drop the protocol argument
    and just not support nl_socket_set_fd() on older systems. But instead
    keep the argument and allow passing -1 to autodetect it.
    
    If the user sets a protocol option, we check via getsockopt() that the
    value is correct and error out otherwise.
    
    On older kernels, the user must set the value. Otherwise
    nl_socket_set_fd() will fail.
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
Commits on Mar 5, 2015
  1. libnl-3.2.26-rc1 release

    authored
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  2. build: fix path to linker version scripts for out-of-tree build

    authored
    Fixes: e7d57da
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  3. lib/socket: add nl_socket_set_fd() function

    authored
    This is based on the patch by sagil@infinidat.com, but heavily modified.
    
    Add a function nl_socket_set_fd(), I renamed it from nl_connect_fd().
    
    Now nl_connect() and nl_socket_set_fd() are implemented independently as
    they share little code. But they have similar functionality:
    to initialize a libnl socket and set it's file descriptor.
    
    A user who wants libnl to setup the socket can continue to use nl_connect().
    A user with special requirements should setup the socket entirely. That includes
    calling socket() (with or without SOCK_CLOEXEC), bind(), setting buffer size.
    
    For the same reason I dropped nl_create_fd(). It didn't do much more then
    calling socket() -- which the user can do directly.
    
    #68
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  4. @sagilow

    add socket nl_connect_fd() & nl_create_fd()

    sagilow authored committed
    -    Added option to create socket (fd) without bind.
         It is now possible to forward the socket fd to another child process...
         ...later use nl_connect_fd() to connect to socket from the child process.
    
    -    Added option to disable CLOEXEC even if defined (in socket.h)
         'nl_socket_enable_cloexec' & 'nl_socket_disable_cloexec'
         No change to current default behavior.
    
     Signed-off-by: Sagi Lowenhardt <sagil@infinidat.com>
  5. lib/nl: preserve s_local if nl_connect() fails

    authored
    s_local.nl_pid is used to track the generated port unless NL_OWN_PORT is set.
    Ensure that getsockname() doesn't overwrite the value and possibly reset
    the local port manually to release the generated port.
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  6. lib/socket: remove NL_SOCK_BUFSIZE_SET socket flag

    authored
    The flag was not actually used.
    
    NL_SOCK_BUFSIZE_SET was only set by nl_socket_set_buffer_size().
    Note that you can only call nl_socket_set_buffer_size() on a socket that
    is already connected via nl_connect().
    
    On first call, nl_connect() would always see NL_SOCK_BUFSIZE_SET unset, and
    call nl_socket_set_buffer_size().
    
    Since the flag was never unset, when trying to connect a socket a second
    time, we would not set the buffer size again. Which was a bug.
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  7. dbg: save errno from modification in NL_DBG()

    authored
    Evaluating the logging statement might overwrite the errno. Save and
    restore it so that NL_DBG() preserves the errno.
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
Commits on Mar 4, 2015
  1. @congwang

    cls: add rtnl_u32_get_classid() API

    congwang authored committed
    [thaller@redhat.com: modified patch to use rtnl_tc_data_peek()]
    
    http://lists.infradead.org/pipermail/libnl/2015-March/001841.html
    
    Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  2. build/trivial: reorder symbols in linker version scripts and add comment

    authored
    We export some symbols that are in private headers. We shouldn't do
    that. Highlight them in the version script by grouping them and add
    a comment.
    
    We might want to hide these symbols later.
    
    Some of these symbols symbols are used by libnl internal libraries.
    So removing those is more complicated and only possible if we don't
    required compatibility of different libnl libraries between each other
    (i.e. that we require that within one installation the library versions
    match).
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  3. route/tc: add internal rtnl_tc_data_peek() function

    authored
    Signed-off-by: Thomas Haller <thaller@redhat.com>
Commits on Feb 25, 2015
  1. @congwang

    correct --protocol option for nl-cls-* utilities

    congwang authored committed
    Just in the help message.
    
    Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  2. @congwang

    act: correct file path for mirred.c

    congwang authored committed
    Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
    Signed-off-by: Thomas Haller <thaller@redhat.com>
Commits on Feb 18, 2015
  1. @lkundrak

    build: fix parallel make

    lkundrak authored committed
    Add missing inter-library dependencies.
    
    Fixes: e7d57da
    
    #69
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
Commits on Feb 17, 2015
  1. pktloc: fix typo for tcp.flag.syn

    authored
    http://lists.infradead.org/pipermail/libnl/2015-February/001829.html
    http://lists.infradead.org/pipermail/libnl/2015-February/001830.html
    
    Reported-by: Georgi Chulkov <georgi@guinpen.eu>
    Acked-by: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  2. @lkundrak

    lib: log errors from platform

    lkundrak authored committed
    nl_syserr2nlerr() reduces a lot of platform errors to NLE_FAILURE --
    "Unspecific failure" which makes it somehow hard to track down the real reason
    behind a failure.
    
    Logging them with level of 4 makes it a little less painful.
    
    #65
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
Commits on Feb 16, 2015
  1. @rojoyce

    lib: add const-ness to appropriate parameters in addr, attr, data

    rojoyce authored committed
    This patch changes the signatures of some functions to allow const pointers in
    places where a const qualified pointer is enough access for what the function
    does (e.g. nla_get_u8). It also changes some functions that take a pointer
    parameter and return a pointer derived from it to use the strchr idiom.
    
    This is not exhaustive in terms of places where const can be added, but it's
    a decent chunk that should not make the external api any more restrictive.
    
    http://lists.infradead.org/pipermail/libnl/2015-February/001826.html
    
    Signed-off-by: Rohan Joyce <rojoyce.github@gmail.com>
    Signed-off-by: Thomas Haller <thaller@redhat.com>
Commits on Feb 2, 2015
  1. @congwang

    route/tc: add rtnl_tc_stat2str() and rtnl_tc_str2stat()

    congwang authored committed
    [thaller@redhat.com: add symbols to libnl-route-3.sym]
    
    Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  2. route/act: merge branch 'act-skbedit'

    authored
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  3. @congwang

    route/act: add a test case for skbedit action

    congwang authored committed
    Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  4. @congwang

    route/act: add skbedit action

    congwang authored committed
    [thaller@redhat.com: changed whitespace and libnl-route.sym]
    
    Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  5. build: merge branch 'symbol-versioning'

    authored
    No longer export all symbols of the shared libraries
    but pick them explicitly. Hide symbols that were
    private and not part of a public header file.
    
    This is an ABI change, but hopefully not too painful.
    
    There are still symbols in the header files that should
    be private. They continue to be exposed.
    
    http://lists.infradead.org/pipermail/libnl/2015-January/001794.html
  6. build: don't export internal symbols

    authored
    Hide internal symbols from the libraries.
    Before, all symbols were exported, including some that were
    not meant to be public. Hide them now.
    
    This is an ABI break, but nobody was supposed to use these symbols.
    Hence it seems acceptable to hide them now.
    
    Still don't hide any symbols that are internal, but wrongly exported
    in public header files (such as @ct_obj_ops).
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  7. build: move linker script symbols since last stable release to own se…

    authored
    …ction
    
    Move the symbols that were added since the last stable release to a new
    section of the linker file.
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  8. build: explicitly list exported symbols in linker scripts

    authored
    Before all symbols (global: *;) were exported, which included some
    symbols that should not be exported. Update the symbol files to
    exclude everything by default and name the exported symbols
    explicitly.
    
    Still the same symbols as before are exported.
    
        for SO in ./lib/.libs/*.so ./src/lib/.libs/*.so; do
            SYM="$(basename "$SO")"
            SYM="${SYM%.so}.sym"
            cat <<EOF | sed 's/^ *>> //' > "$SYM"
                >> libnl_3 {
                >> global:
                >> $(nm "$SO" | sed -n 's/^[a-fA-F0-9]\+ [BDRT] \(.*\)/\t\1;/p' | LANG=C sort)
                >> local:
                >> $(echo -e '\t')*;
                >> };
        EOF
        done
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  9. build: add linker scripts for libnl-cli-3.so library

    authored
    libnl-cli-3.so was unversioned previously. This is an
    ABI change (but backward compatible).
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
  10. build: add individual linker version scripts for shared libraries

    authored
    Instead of using a shared version script 'libnl.sym', add individual
    linker scripts for all libnl libraries.
    
    For now, the content of the version script is unchanged and this
    patch does not have any externally visible changes.
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
Commits on Jan 12, 2015
  1. python: fix package meta data in setup.py

    authored
    http://lists.infradead.org/pipermail/libnl/2015-January/001802.html
    
    Acked-by: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: Thomas Haller <thaller@redhat.com>
Commits on Dec 9, 2014
Commits on Nov 27, 2014
  1. idiag: fix set of identifying properties for idiag_msg_obj

    authored
    The key for a struct idiag_msg_obj should be
    'family x src x dst x sport x dport'.
    
    http://lists.infradead.org/pipermail/libnl/2014-November/001768.html
    
    Signed-off-by: Thomas Haller <thaller@redhat.com>
Something went wrong with that request. Please try again.