aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--netlink/librtnl/rtnl.c5
-rw-r--r--router/README.md8
2 files changed, 12 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;
}
diff --git a/router/README.md b/router/README.md
index b3ec5ae..8527bd0 100644
--- a/router/README.md
+++ b/router/README.md
@@ -90,6 +90,14 @@ $vppctl show mpls fib
You should see dst label and interface in mpls table.
+### Selinux
+
+Router plugin needs those rules to work under selinux enforcing mode:
+
+```
+allow vpp_t self:netlink_route_socket nlmsg_read;
+```
+
### Main contributors
Jeff Shaw - LF-ID:jbshaw, Chad Chengwei Wang - LF-ID:flinter (MPLS)