2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

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>
This commit is contained in:
Ansis Atteka
2013-04-11 11:33:24 -07:00
parent 63ff04e826
commit f28b6dd3f4

View File

@@ -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));
}