summaryrefslogtreecommitdiffstats
path: root/lib/netfilter/exp.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-05-12 13:04:48 (GMT)
committerThomas Haller <thaller@redhat.com>2015-05-12 13:56:50 (GMT)
commit48182486341d1de7892494f272e892c0b18ebef5 (patch)
tree108923bdf7b27f8bca7a415ab17953e6b9ebf4d5 /lib/netfilter/exp.c
parentc3dd6a7355ace3d1fca1e82a0eb21e0e43dddfba (diff)
downloadlibnl-48182486341d1de7892494f272e892c0b18ebef5.zip
libnl-48182486341d1de7892494f272e892c0b18ebef5.tar.gz
libnl-48182486341d1de7892494f272e892c0b18ebef5.tar.bz2
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 b70174668b9867de573cf51471bc98bfe7fd2bc3 which changed behavior of nl_rtgen_request() to be according to documenation. Don't change behavior again, only adjust the documentation. http://lists.infradead.org/pipermail/libnl/2015-May/001872.html Reported-by: Xiao Jia <stfairy@gmail.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'lib/netfilter/exp.c')
-rw-r--r--lib/netfilter/exp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/netfilter/exp.c b/lib/netfilter/exp.c
index 9cfdd2b..650127c 100644
--- a/lib/netfilter/exp.c
+++ b/lib/netfilter/exp.c
@@ -305,6 +305,13 @@ static int exp_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who,
return err;
}
+/**
+ * Send nfnl exp dump request
+ * @arg sk Netlink socket.
+ *
+ * @return 0 on success or a negative error code. Due to a bug, this function
+ * returns the number of bytes sent. Treat any non-negative number as success.
+ */
int nfnl_exp_dump_request(struct nl_sock *sk)
{
return nfnl_send_simple(sk, NFNL_SUBSYS_CTNETLINK_EXP, IPCTNL_MSG_EXP_GET,