Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Jul 9, 2015
  1. @mattbennett2

    link: set ifi_change in link message

    mattbennett2 authored committed
    The ifi_change field can be set with the mask of the flags that need
    to be changed as part of the link message to the kernel. This means only
    the specific flags that have been changed will be modified in the kernel,
    rather than the entire flags entry.
    [ add capability to indicate the change in behavior]
Commits on Jun 26, 2015
  1. ipvlan: don't check for valid @mode argument in rtnl_link_ipvlan_set_…

    In the future kernel might support more modes. Don't be so
    strict in rtnl_link_ipvlan_set_mode() and accept any uint16
    This way when adding new modes, rtnl_link_ipvlan_set_mode() does not
    need to be changed.
    If the user passes an invalid value and sends a message to the kernel,
    it will be rejected there.
    Fixes: 7de5be8
    Signed-off-by: Thomas Haller <>
  2. neigh: accept "norarp" in rtnl_neigh_state2str()

    Commit 6a9335f fixed a typo in the
    string-to-flags conversion. At least for rtnl_neigh_str2state()
    we want to continue to parse "norarp" for backward compatiblity.
    Signed-off-by: Thomas Haller <>
  3. @toanju

    neigh: fix type for NUD_NOARP flag in trans_tbl

    toanju authored committed
    Translate NUD_NOARP to "noarp", instead of "norarp".
    Fixes: 44d3624
    Signed-off-by: Thomas Haller <>
Commits on Jun 19, 2015
  1. @congwang

    ipvlan: add a testcase for ipvlan

    congwang authored committed
    Signed-off-by: Cong Wang <>
    Signed-off-by: Thomas Haller <>
  2. @congwang

    ipvlan: add ipvlan support

    congwang authored committed
    Signed-off-by: Cong Wang <>
    Signed-off-by: Thomas Haller <>
  3. @jfarrell
Commits on Jun 5, 2015
  1. lib: fix spelling of NL_CAPABILITY_NL_RECV_FAIL_TRUNC_NO_PEEK

    Fixes: bbdcaea
    Signed-off-by: Thomas Haller <>
  2. @spellingmistake

    lib: return error if an incomplete message was read

    spellingmistake authored committed
    If recvmsg indicates that the message read was truncated libnl retries
    to read the complete message after increasing the message buffer. This
    only works if the message flags MSG_PEEK | MSG_TRUNC are set. If
    NL_MSG_PEEK is not enabled on the nl_sock structure, flags are left
    empty and the rest of the truncated message is discarded, hence a
    subsequent recvmsg returns the next message (in case of a multipart
    message, the NLMSG_DONE) is read and returned.
    This patch aborts message processing if the message was truncated and
    the NL_MSG_PEEK flags was not activated for the nl_sock structure.
    Signed-off-by: Thomas Egerer <>
    Signed-off-by: Thomas Haller <>
Commits on Jun 4, 2015
  1. utils: add missing link layer protocol translations

    Signed-off-by: Thomas Haller <>
  2. @tklauser

    utils: update link layer protocol translations

    tklauser authored committed
    Update the private copy of linux/if_arp.h and hook up the not yet
    defined ARPHRD_* types in the llprotos translation table. Reorder the
    entries such that they correspond to the order they're defined in
    linux/if_arp.h. Also remove the #ifdef guards since these are
    unnecessary given that the private copy of the kernel header is used.
    Signed-off-by: Tobias Klauser <>
    Signed-off-by: Thomas Haller <>
Commits on May 12, 2015
  1. lib/doc: clearify return value of send_simple() functions

    The return value of the *nl_send_simple() functions is
    inconsistent and not according to the documentation.
    nl_send_simple() is document to return the number of bytes sent.
    Other *nl_send_simple() functions are documented to return 0 on
    success -- for the most part.
    See also commit b701746 which
    changed behavior of nl_rtgen_request() to be according to documenation.
    Don't change behavior again, only adjust the documentation.
    Reported-by: Xiao Jia <>
    Signed-off-by: Thomas Haller <>
  2. xfrm: trival refactoring initialization of stack-allocated arguments …

    …to nl_send_simple()
    Signed-off-by: Thomas Haller <>
  3. python: merge branch 'python-capi'

    Disable debug macro in swig API to reduce the noise
    and expose a couple of functions.
  4. @arend

    python: genl: capi: add genlmsg_hdr() to capi

    arend authored committed
    Allow using genlmsg_hdr() function and make the header fields
    accessible in Python scripts.
    Signed-off-by: Arend van Spriel <>
  5. @arend

    python: capi: add nla_put() function to python capi

    arend authored committed
    Adding nla_put() to the capi using a typemap on the input
    parameter which needs to be either a str or bytearray.
    Otherwise a SWIG exception with be thrown.
    Signed-off-by: Arend van Spriel <>
  6. @arend

    python: capi: expose multicast membership functions

    arend authored committed
    Adding functions to add/drop membership to single multicast group.
    Signed-off-by: Arend van Spriel <>
  7. @arend

    python: disable swig debug print messages

    arend authored committed
    The define was left enabled during development on netlink (and genl)
    python swig api. It is a bit annoying in production release so disable
    the define.
    Signed-off-by: Arend van Spriel <>
  8. @tklauser

    xfrm: fix potential NULL dereference

    tklauser authored committed
    If xfrmnl_sel_alloc() returns NULL, the daddr and saddr members are
    still accessed, leading to a potential NULL dereference. The same is the
    case for xfrmnl_user_tmpl_alloc(). Fix this by returning NULL right away
    if allocation fails.
    Signed-off-by: Tobias Klauser <>
    Signed-off-by: Thomas Haller <>
Commits on May 5, 2015
  1. @tklauser

    route/tc: remove unnecessary check for tc_kind member of struct rtnl_tc

    tklauser authored committed
    The tc_kind member of struct rtnl_tc (and all types which can be
    converted to it) is defined as an array and can thus never be
    Signed-off-by: Tobias Klauser <>
    Signed-off-by: Thomas Haller <>
  2. @tklauser

    utils: Add translations for NETLINK_RDMA and NETLINK_CRYPTO

    tklauser authored committed
    Add translations for NETLINK_RDMA and NETLINK_CRYPTO to nlfamilies,
    allowing to use nl_nlfamily2str() and nl_str2nlfamily() for these
    This makes it necessary to update the private copy of linux/netlink.h
    and also includes the rename of NETLINK_INET_DIAG to NETLINK_SOCK_DIAG
    in upstream commit 7f1fb60c4fc9fb29 ("inet_diag: Partly rename inet_ to
    sock_") and the removal of the duplicate NLMSG_ALIGN in the
    NLMSG_LENGTH() macro in upstream commit a88b9ce5ad4fc633 ("netlink:
    remove duplicated NLMSG_ALIGN").
    Signed-off-by: Tobias Klauser <>
    Signed-off-by: Thomas Haller <>
Commits on Mar 30, 2015
  1. libnl-3.2.26 release

    Signed-off-by: Thomas Haller <>
Commits on Mar 23, 2015
  1. @jonasj76

    neigh: add support for NDA_VLAN nl attribute

    jonasj76 authored committed
    [ modified patch to parse NDA_VLAN and diff vlan]
    Signed-off-by: Jonas Johansson <>
    Signed-off-by: Thomas Haller <>
Commits on Mar 22, 2015
  1. route/link: fix indention in inet6_dump_details()

    Signed-off-by: Thomas Haller <>
Commits on Mar 19, 2015
  1. utils: add code comment about capability number assignment

    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 <>
Commits on Mar 18, 2015
  1. build: extend configure option --enable-cli and install all cli programs

    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 <>
    Signed-off-by: Thomas Haller <>
  2. build/trivial: sort PROGRAMS list in src/

    Signed-off-by: Thomas Haller <>
Commits on Mar 17, 2015
  1. @davidchappelle

    route: remove unnecessary include of private linux/if.h

    davidchappelle 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:
    By removing the include as the patch suggests we can get
    around the nuissance of the symbol collisions.
    Signed-off-by: Thomas Haller <>
Commits on Mar 9, 2015
  1. build: revert moving unstable symbols from libnl_3 linker section

    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
    Fixes: d2a30fb
    Signed-off-by: Thomas Haller <>
Commits on Mar 6, 2015
  1. lib/socket: detect protocol in nl_socket_set_fd()

    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 <>
Commits on Mar 5, 2015
  1. libnl-3.2.26-rc1 release

    Signed-off-by: Thomas Haller <>
Something went wrong with that request. Please try again.