aboutsummaryrefslogtreecommitdiffstats
path: root/netlink
diff options
context:
space:
mode:
authorTomasz Plaza <tomasz.plaza@grupawp.pl>2018-07-02 08:51:17 +0200
committerTomasz Plaza <tomasz.plaza@gmail.com>2018-07-02 09:02:10 +0200
commit38f03b2d6ca0a83846171a0f57b0ae3834f6c2a5 (patch)
tree3ed4c945ede9e85b2415f762e06cbe64467705f8 /netlink
parent9791ab9fa07347fd063a55dc44cc1b0b67ee2292 (diff)
Note about selinux rules used by router plugin and log added about sendmsg error in netlink.
Change-Id: Id761357ae5842e66d3425ec5e949ac284dca98cf Signed-off-by: Tomasz PÅ‚aza <tomasz.plaza@gmail.com>
Diffstat (limited to 'netlink')
-rw-r--r--netlink/librtnl/rtnl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/netlink/librtnl/rtnl.c b/netlink/librtnl/rtnl.c
index 14ea0e8..a849dc6 100644
--- a/netlink/librtnl/rtnl.c
+++ b/netlink/librtnl/rtnl.c
@@ -32,6 +32,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <errno.h>
+#include <string.h>
#undef DBL_MAX
#define DBL_MAX 1000000000.0
@@ -142,8 +143,10 @@ int rtnl_dump_request(rtnl_ns_t *ns, int type, void *req, size_t len)
.msg_iov = iov,
.msg_iovlen = 2,
};
- if(sendmsg(ns->rtnl_socket, &msg, 0) < 0)
+ if(sendmsg(ns->rtnl_socket, &msg, 0) < 0) {
+ clib_warning("sendmsg error: %s", strerror(errno));
return -1;
+ }
return 0;
}