Permalink
Commits on Sep 7, 2017
  1. cli: include sys/select.h for select(2)

    tklauser authored and thom311 committed Sep 7, 2017
    Some of the cli tools use select(2) and its man page states:
    
      /* According to POSIX.1-2001, POSIX.1-2008 */
      #include <sys/select.h>
    
    Do so and explicitly #include <sys/select.h> in <netlink/cli/utils.h>
    instead of relying of getting select(2) via implicit includes. This is
    also needed to make libnl compile for Android.
    
    Based on a previous patch by Fredrik Fornwall.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
    
    #151
Commits on May 29, 2017
  1. genl: drop usage of GENL_ID_GENERATE

    tklauser authored and thom311 committed May 23, 2017
    After kernel commit a07ea4d9941a ("genetlink: no longer support using
    static family IDs"), GENL_ID_GENERATE is no longer exposed to userspace
    (and actually should never have been). Update the private header copy of
    linux/genetlink.h accordingly. And replace the two occurences of
    GENL_ID_GENERATE.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
    
    #144
Commits on May 12, 2017
  1. addr: add AF_VSOCK to translation table

    tklauser authored and thom311 committed May 5, 2017
    Add AF_VSOCK to the address family translation table.
    
    #142
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
    Signed-off-by: Thomas Haller <thaller@redhat.com>
Commits on Jan 20, 2017
  1. build: Add -Wmissing-prototypes to CPPFLAGS

    tklauser committed Jan 16, 2017
    Now that all -Wmissing-prototypes warnings are fixed, add it to the
    default CPPFLAGS.
    
    This should hopefully prevent additions of public functions with wrong
    prototype or no prototype at all to the public header.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  2. ematch: Add missing function prototypes

    tklauser committed Jan 17, 2017
    Older versions of flex (namely the one used on Travis CI) don't properly
    emit function prototypes for ematch_get_column() and
    ematch_set_column(), leading to GCC -Wmissing-prototypes warnings. Fix
    them by manually adding these prototypes.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  3. pktloc: Add missing function prototypes

    tklauser committed Jan 17, 2017
    Older versions of flex (namely the one used on Travis CI) don't properly
    emit function prototypes for pktloc_get_column() and
    pktloc_set_column(), leading to GCC -Wmissing-prototypes warnings. Fix
    them by manually adding these prototypes.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  4. xfrm/template: Include own public header for function prototypes

    tklauser committed Jan 16, 2017
    Include the own public header in order to get function prototypes for
    all public functions defined in this module.
    
    This fixes GCC -Wmissing-prototype warnings.
    
    Also adjust the implementation of xfrmnl_user_tmpl_set_family() to match
    the declaration (family parameter is unsigned int, not int).
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  5. xfrm/selector: Include own public header for function prototypes

    tklauser committed Jan 17, 2017
    Include the own public header in order to get function prototypes for
    all public functions defined in this module.
    
    This fixes GCC -Wmissing-prototype warnings.
    
    Also adjust the implementation of xfrmnl_sel_set_family() to match the
    declaration (family parameter is unsigned int, not int).
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  6. xfrm/sa: Include own public header for function prototypes

    tklauser committed Jan 17, 2017
    Include the own public header in order to get function prototypes for
    all public functions defined in this module.
    
    This fixes GCC -Wmissing-prototype warnings.
    
    Also adjust the function prototype of xfrmnl_sa_get_sec_ctx() to
    match the definition.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  7. xfrm/lifetime: Include own public header for function prototypes

    tklauser committed Jan 17, 2017
    Include the own public header in order to get function prototypes for
    all public functions defined in this module.
    
    This fixes GCC -Wmissing-prototype warnings.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  8. xfrm/ae: Include own public header for function prototypes

    tklauser committed Jan 17, 2017
    Include the own public header in order to get function prototypes for
    all public functions defined in this module.
    
    This fixes GCC -Wmissing-prototype warnings.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  9. idiag/req: Add missing function prototype

    tklauser committed Jan 17, 2017
    Add missing function prototype for idiagnl_req_parse() to the public
    header.
    
    This fixes the following GCC warning when compiling with
    -Wmissing-prototypes:
    
      idiag/idiag_req_obj.c:189:5: warning: no previous prototype for ‘idiagnl_req_parse’ [-Wmissing-prototypes]
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  10. netfilter/exp: Add missing function prototypes

    tklauser committed Jan 16, 2017
    Add missing function prototypes for nfnl_exp_unset_flags(),
    nfnl_exp_flags2str() and nfnl_exp_str2flags() to the public header.
    
    This fixes the following GCC warnings when compiling with
    -Wmissing-prototypes:
    
      netfilter/exp_obj.c:458:6: warning: no previous prototype for ‘nfnl_exp_unset_flags’ [-Wmissing-prototypes]
      netfilter/exp_obj.c:475:8: warning: no previous prototype for ‘nfnl_exp_flags2str’ [-Wmissing-prototypes]
      netfilter/exp_obj.c:481:5: warning: no previous prototype for ‘nfnl_exp_str2flags’ [-Wmissing-prototypes]
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  11. netfilter/queue: Add missing prototype for nfnl_queue_msg_build_verdi…

    tklauser committed Jan 16, 2017
    …ct_batch()
    
    Add the function prototype for nfnl_queue_msg_build_verdict_batch() to
    the public header.
    
    This fixes the following GCC warning when building with
    -Wmissing-prototypes:
    
      netfilter/queue_msg.c:190:1: warning: no previous prototype for ‘nfnl_queue_msg_build_verdict_batch’ [-Wmissing-prototypes]
    
    Fixes: d612180 ("netfilter/queue: introduce nfnl_queue_msg_send_verdict_batch()")
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  12. link/ipgre: Add prototype for ABI-preserving wrapper rtnl_link_get_pm…

    tklauser committed Jan 16, 2017
    …tudisc()
    
    Avoid a GCC -Wmissing-prototypes warning by explicitely adding a
    prototype for the ABI-preserving wrapper added in commit 8d04ebf
    ("lib/route: preserve old ABI for rtnl_link_get_pmtudisc()") and add an
    explanatory comment.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  13. link/sit: Add missing prototype for rtnl_link_is_sit()

    tklauser committed Jan 16, 2017
    Add the function prototype for rtnl_link_is_ipip() to the public header.
    
    This fixes the following GCC warning when compiling with
    -Wmissing-prototypes:
    
      route/link/sit.c:400:5: warning: no previous prototype for ‘rtnl_link_is_sit’ [-Wmissing-prototypes]
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  14. link/macsec: Include own public header for function prototypes

    tklauser committed Jan 16, 2017
    Include the own public header in order to get function prototypes for
    all public functions defined in this module.
    
    This fixes GCC -Wmissing-prototype warnings
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  15. link/ipvti: Fix and add function prototypes in public header

    tklauser committed Jan 16, 2017
    Add missing "_ipvti" part to function prototypes so they match the
    exported name. Also add the missing prototype for rtnl_link_is_ipvti().
    
    This fixes the following GCC warnings when compiling with
    -Wmissing-prototypes:
    
      route/link/ipvti.c:281:5: warning: no previous prototype for ‘rtnl_link_is_ipvti’ [-Wmissing-prototypes]
      route/link/ipvti.c:369:10: warning: no previous prototype for ‘rtnl_link_ipvti_get_ikey’ [-Wmissing-prototypes]
      route/link/ipvti.c:403:10: warning: no previous prototype for ‘rtnl_link_ipvti_get_okey’ [-Wmissing-prototypes]
      route/link/ipvti.c:437:10: warning: no previous prototype for ‘rtnl_link_ipvti_get_local’ [-Wmissing-prototypes]
      route/link/ipvti.c:471:10: warning: no previous prototype for ‘rtnl_link_ipvti_get_remote’ [-Wmissing-prototypes]
    
    Also fix the corresponding names in documentation.
    
    Fixes: 8f63014 ("ipvti: introduce vti tunnel support")
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  16. link/ipvti: Include own public header for function prototypes

    tklauser committed Jan 16, 2017
    Include the own public header in order to get function prototypes for
    all public functions defined in this module.
    
    This fixes GCC -Wmissing-prototype warnings.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  17. link/ipip: Add missing prototype for rtnl_link_is_ipip()

    tklauser committed Jan 16, 2017
    Add the function prototype for rtnl_link_is_ipip() to the public header.
    
    This fixes the following GCC warning when compiling with
    -Wmissing-prototypes:
    
      route/link/ipip.c:296:5: warning: no previous prototype for ‘rtnl_link_is_ipip’ [-Wmissing-prototypes]
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  18. link/ipip: Include own public header for function prototypes

    tklauser committed Jan 16, 2017
    Include the own public header in order to get function prototypes for
    all public functions defined in this module.
    
    This fixes GCC -Wmissing-prototype warnings.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  19. link/inet6: Include own public header for function prototypes

    tklauser committed Jan 16, 2017
    Include the own public header in order to get function prototypes for
    all public functions defined in this module.
    
    This fixes GCC -Wmissing-prototype warnings.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  20. fib_lookup: Add missing prototypes to public header

    tklauser committed Jan 16, 2017
    Add the function prototypes for the struct flnl_result attribute access
    functions to the public header fib_lookup/lookup.h
    
    This fixes the following GCC warnings when compiling with
    -Wmissing-prototypes:
    
      fib_lookup/lookup.c:284:5: warning: no previous prototype for ‘flnl_result_get_table_id’ [-Wmissing-prototypes]
      fib_lookup/lookup.c:289:5: warning: no previous prototype for ‘flnl_result_get_prefixlen’ [-Wmissing-prototypes]
      fib_lookup/lookup.c:294:5: warning: no previous prototype for ‘flnl_result_get_nexthop_sel’ [-Wmissing-prototypes]
      fib_lookup/lookup.c:299:5: warning: no previous prototype for ‘flnl_result_get_type’ [-Wmissing-prototypes]
      fib_lookup/lookup.c:304:5: warning: no previous prototype for ‘flnl_result_get_scope’ [-Wmissing-prototypes]
      fib_lookup/lookup.c:309:5: warning: no previous prototype for ‘flnl_result_get_error’ [-Wmissing-prototypes]
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  21. qdisc/red: Add missing prototypes for rtnl_red_set_limit() and rtnl_r…

    tklauser committed Jan 16, 2017
    …ed_get_limit()
    
    This fixes the following GCC warnings when compiling with
    -Wmissing-prototypes:
    
      route/qdisc/red.c:136:6: warning: no previous prototype for ‘rtnl_red_set_limit’ [-Wmissing-prototypes]
      route/qdisc/red.c:152:5: warning: no previous prototype for ‘rtnl_red_get_limit’ [-Wmissing-prototypes]
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  22. sriov: Add missing prototype for rtnl_link_vf_vlan_free()

    tklauser committed Jan 16, 2017
    Add missing function prototyoe for rtnl_link_vf_vlan_free() to the
    public header.
    
    This fixes the following GCC warning when compiling with
    -Wmissing-prototypes:
    
      route/link/sriov.c:1339:6: warning: no previous prototype for ‘rtnl_link_vf_vlan_free’ [-Wmissing-prototypes]
    
    Fixes: 5d6e43e ("lib/route: SRIOV Parse and Read support")
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  23. sit: Fix invalid function prototypes in public header

    tklauser committed Jan 16, 2017
    Change rtnl_link_get_sit_local() rtnl_link_sit_get_local() as this is
    the function's exported name.
    
    This fixes a GCC -Wmissing-prototypes warning.
    
    Fixes: d715b8a ("introduce sit tunnel support")
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Commits on Jan 13, 2017
  1. route/tc: Remove unused function tca_set_kind()

    tklauser authored and thom311 committed Jan 13, 2017
    The public prototype and the last internal user of the function were
    removed in commit 8eb5b55 ("Unified TC API") and it was unexported in
    commit 4280dfb ("build: don't export internal symbols"), so it is
    safe to remove it.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
    Signed-off-by: Thomas Haller <thaller@redhat.com>
    
    #122
Commits on Dec 6, 2016
  1. link: fix documentation for rtnl_link_get_carrier_changes

    tklauser authored and thom311 committed Dec 6, 2016
    The doxygen comment of rtnl_link_get_carrier_changes still describes the
    initially implemented behaviour and was not updated, when the signature
    was changed as part of #119. Adjust it accordingly.
    
    Fixes: 0c4b2ea ("link: add support for IFLA_CARRIER_CHANGES")
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
    
    #120
  2. link: add support for IFLA_GSO_MAX_SEGS and IFLA_GSO_MAX_SIZE

    tklauser committed Dec 6, 2016
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  3. link: add support for IFLA_PHYS_SWITCH_ID

    tklauser committed Dec 6, 2016
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  4. link: add support for IFLA_PHYS_PORT_NAME

    tklauser committed Dec 6, 2016
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  5. link: add support for IFLA_CARRIER_CHANGES

    tklauser committed Dec 6, 2016
    Also expose the attribute value via link_dump_details()
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Commits on Dec 2, 2016
  1. cache: fix GCC warning and avoid variable shadowing

    tklauser authored and thom311 committed Dec 2, 2016
    Fix the following GCC warning, introduced in commit 66d032a
    ("cache_mngr: add include callback v2"):
    
    cache.c: In function ‘cache_include.isra.3’:
    cache.c:810:6: warning: ‘diff’ may be used uninitialized in this function [-Wmaybe-uninitialized]
          cb_v2(cache, clone, obj, diff,
                ^
    
    Also don't redeclare the uint64_t diff variable, to avoid shadowing.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
    Signed-off-by: Thomas Haller <thaller@redhat.com>
    
    Fixes: 66d032a
    
    http://lists.infradead.org/pipermail/libnl/2016-December/002258.html
Commits on Nov 29, 2016
  1. lib/route: add rx_nohandler link stats field

    tklauser committed Nov 29, 2016
    A new counter rx_nohandler was added to the link stats in kernel commit
    6e7333d315a7 ("net: add rx_nohandler stat counter"). Wire it up in the
    libnl link stats as well.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  2. src: nl-link-stats: use correct rtnl link stats maximum

    tklauser committed Nov 29, 2016
    Use __RTNL_LINK_STATS_MAX instead of RTNL_LINK_STATS_MAX when iterating
    over all rtnl link stat counters. Otherwise, the last stat counter will
    always be missing, as RTNL_LINK_STATS_MAX is the value of the last valid
    index.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>