all: merge branch 'various-fixes'

http://lists.infradead.org/pipermail/libnl/2016-August/002177.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller 2016-08-14 10:06:13 +02:00
commit 9867bc2053
4 changed files with 15 additions and 10 deletions

View File

@ -17,7 +17,7 @@ libraries (e.g. "nl-route", "nl-genl", ...).
The library is designed to ensure that all components are optional, i.e.
even though the core library provides a caching system which allows to
easly manage objects of any kind, no application is required to use this
easily manage objects of any kind, no application is required to use this
caching system if it has no need for it.
The library was developed and tested on 2.6.x and 3.x kernel releases. It
@ -39,7 +39,7 @@ git://git.infradead.org/users/tgr/libnl.git
\section main_website Website
- http://www.infradead.org/~tgr/libnl/
- https://www.infradead.org/~tgr/libnl/
\section main_mailinglist Mailinglist
@ -49,6 +49,6 @@ Please post questions and patches to the libnl mailinglist:
libnl@lists.infradead.org
@endcode
- Archives: http://canuck.infradead.org/pipermail/libnl/
- Archives: https://lists.infradead.org/pipermail/libnl/
*/

View File

@ -61,8 +61,10 @@ extern "C" {
#endif
extern uint32_t nl_cli_parse_u32(const char *);
extern void nl_cli_print_version(void);
extern void nl_cli_fatal(int, const char *, ...);
extern void nl_cli_print_version(void)
__attribute__((noreturn));
extern void nl_cli_fatal(int, const char *, ...)
__attribute__((noreturn));
extern struct nl_addr * nl_cli_addr_parse(const char *, int);
extern int nl_cli_connect(struct nl_sock *, int);
extern struct nl_sock * nl_cli_alloc_socket(void);

View File

@ -357,10 +357,10 @@ static int nfnl_exp_build_tuple(struct nl_msg *msg, const struct nfnl_exp *exp,
int type = exp_get_tuple_attr(cta);
if (cta == CTA_EXPECT_NAT)
tuple = nla_nest_start(msg, CTA_EXPECT_NAT_TUPLE);
else
tuple = nla_nest_start(msg, cta);
if (cta == CTA_EXPECT_NAT)
tuple = nla_nest_start(msg, CTA_EXPECT_NAT_TUPLE);
else
tuple = nla_nest_start(msg, cta);
if (!tuple)
goto nla_put_failure;

View File

@ -1175,7 +1175,10 @@ static int build_xfrm_sa_message(struct xfrmnl_sa *tmpl, int cmd, int flags, str
strncpy(auth->alg_name, tmpl->auth->alg_name, sizeof(auth->alg_name));
auth->alg_key_len = tmpl->auth->alg_key_len;
memcpy(auth->alg_key, tmpl->auth->alg_key, (tmpl->auth->alg_key_len + 7) / 8);
NLA_PUT(msg, XFRMA_ALG_AUTH, len, auth);
if (nla_put(msg, XFRMA_ALG_AUTH, len, auth) < 0) {
free(auth);
goto nla_put_failure;
}
free(auth);
}
}