Permalink
Commits on Jan 20, 2017
  1. build: Add -Wmissing-prototypes to CPPFLAGS

    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>
    tklauser committed Jan 16, 2017
  2. ematch: Add missing function prototypes

    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>
    tklauser committed Jan 17, 2017
  3. pktloc: Add missing function prototypes

    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>
    tklauser committed Jan 17, 2017
  4. xfrm/template: Include own public header for function prototypes

    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>
    tklauser committed Jan 16, 2017
  5. xfrm/selector: Include own public header for function prototypes

    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>
    tklauser committed Jan 17, 2017
  6. xfrm/sa: Include own public header for function prototypes

    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>
    tklauser committed Jan 17, 2017
  7. xfrm/lifetime: Include own public header for function prototypes

    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>
    tklauser committed Jan 17, 2017
  8. xfrm/ae: Include own public header for function prototypes

    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>
    tklauser committed Jan 17, 2017
  9. idiag/req: Add missing function prototype

    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>
    tklauser committed Jan 17, 2017
  10. netfilter/exp: Add missing function prototypes

    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>
    tklauser committed Jan 16, 2017
  11. netfilter/queue: Add missing prototype for nfnl_queue_msg_build_verdi…

    …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>
    tklauser committed Jan 16, 2017
  12. link/ipgre: Add prototype for ABI-preserving wrapper rtnl_link_get_pm…

    …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>
    tklauser committed Jan 16, 2017
  13. link/sit: Add missing prototype for rtnl_link_is_sit()

    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>
    tklauser committed Jan 16, 2017
  14. link/macsec: Include own public header for function prototypes

    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>
    tklauser committed Jan 16, 2017
  15. link/ipvti: Fix and add function prototypes in public header

    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>
    tklauser committed Jan 16, 2017
  16. link/ipvti: Include own public header for function prototypes

    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>
    tklauser committed Jan 16, 2017
  17. link/ipip: Add missing prototype for rtnl_link_is_ipip()

    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>
    tklauser committed Jan 16, 2017
  18. link/ipip: Include own public header for function prototypes

    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>
    tklauser committed Jan 16, 2017
  19. link/inet6: Include own public header for function prototypes

    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>
    tklauser committed Jan 16, 2017
  20. fib_lookup: Add missing prototypes to public header

    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>
    tklauser committed Jan 16, 2017
  21. qdisc/red: Add missing prototypes for rtnl_red_set_limit() and rtnl_r…

    …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>
    tklauser committed Jan 16, 2017
  22. sriov: Add missing prototype for rtnl_link_vf_vlan_free()

    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>
    tklauser committed Jan 16, 2017
  23. sit: Fix invalid function prototypes in public header

    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>
    tklauser committed Jan 16, 2017
Commits on Jan 13, 2017
  1. route/tc: Remove unused function tca_set_kind()

    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
    tklauser committed with Jan 13, 2017
Commits on Dec 6, 2016
  1. link: fix documentation for rtnl_link_get_carrier_changes

    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
    tklauser committed with Dec 6, 2016
  2. link: add support for IFLA_GSO_MAX_SEGS and IFLA_GSO_MAX_SIZE

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

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

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

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

    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
    tklauser committed with Dec 2, 2016
Commits on Nov 29, 2016
  1. lib/route: add rx_nohandler link stats field

    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>
    tklauser committed Nov 29, 2016
  2. src: nl-link-stats: use correct rtnl link stats maximum

    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>
    tklauser committed Nov 29, 2016
Commits on Nov 28, 2016
  1. lib/route: keep link stats minlen compatible with kernel < 4.6

    Since linux/if_link.h was synced in libnl commit d533736 ("vxlan:
    add support for additional VXLAN attributes."), the minlen check in
    validate_nla() fails on kernels < 4.6 - or more precisely, on kernels
    not containing kernel commit 6e7333d315a7 ("net: add rx_nohandler stat
    counter"). The check fails because rtnl_link_stats and rtnl_link_stats64
    sent by the kernel don't have the rx_nohandler member yet, but libnl
    expects them to have it.
    
    Account for this by decreasing the minlen by one member and add an
    explanatory comment.
    
    #116
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
    Signed-off-by: Thomas Haller <thaller@redhat.com>
    tklauser committed with Nov 15, 2016
Commits on Mar 31, 2016
  1. build: move -rdynamic from CPPFLAGS to LDFLAGS

    The -rdynamic flag is a linker flag, not a compiler/preprocessor flag,
    so move it to LDFLAGS.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
    Signed-off-by: Thomas Haller <thaller@redhat.com>
    
    http://lists.infradead.org/pipermail/libnl/2016-March/002100.html
    tklauser committed with Mar 31, 2016
Commits on Aug 31, 2015
  1. route/link: add missing link_attrs translations

    Add LINK_ATTR_NSFD, LINK_ATTR_NS_PID and LINK_ATTR_LINK_NETNSID to the
    link_attrs translation table after they were added in commits
    760bfab ("add link netns support") and 66aab65 ("route/link:
    add support for IFLA_LINK_NETNSID") respectively.
    
    http://lists.infradead.org/pipermail/libnl/2015-August/001959.html
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
    Signed-off-by: Thomas Haller <thaller@redhat.com>
    tklauser committed with Aug 20, 2015