aboutsummaryrefslogtreecommitdiff
path: root/lib/netlink-socket.c
diff options
context:
space:
mode:
authorAnsis Atteka <aatteka@nicira.com>2013-04-11 11:33:24 -0700
committerAnsis Atteka <aatteka@nicira.com>2013-04-11 11:33:24 -0700
commitf28b6dd3f49d355b18e631e441f52611de4e8b13 (patch)
treefdcef43c6e4b7d6e2c26e44c1f90c1f111ca7d95 /lib/netlink-socket.c
parent63ff04e82623e76521add85287b2ac0e1829bcfe (diff)
netlink-socket: Don't bother logging SO_RCVBUFFORCE failure
This patch fixes tests when they are run with "fakeroot debian/rules binary" command. The problem was that under fakeroot setsockopt() call could still return EPERM and lead to a warning message being logged. Signed-off-by: Ansis Atteka <aatteka@nicira.com>
Diffstat (limited to 'lib/netlink-socket.c')
-rw-r--r--lib/netlink-socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c
index e6b10a18..392bcf53 100644
--- a/lib/netlink-socket.c
+++ b/lib/netlink-socket.c
@@ -130,7 +130,7 @@ nl_sock_create(int protocol, struct nl_sock **sockp)
&rcvbuf, sizeof rcvbuf)) {
/* Only root can use SO_RCVBUFFORCE. Everyone else gets EPERM.
* Warn only if the failure is therefore unexpected. */
- if (errno != EPERM || !getuid()) {
+ if (errno != EPERM) {
VLOG_WARN_RL(&rl, "setting %d-byte socket receive buffer failed "
"(%s)", rcvbuf, strerror(errno));
}