From: Ansis Atteka Date: Thu, 11 Apr 2013 18:33:24 +0000 (-0700) Subject: netlink-socket: Don't bother logging SO_RCVBUFFORCE failure X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f28b6dd3f49d355b18e631e441f52611de4e8b13;p=sliver-openvswitch.git 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 --- diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c index e6b10a184..392bcf53c 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)); }