From 6228a3b8743ea2a6589070de926588e2ceb0f27f Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Wed, 7 Dec 2016 13:21:46 -0200 Subject: *: always set SO_SNDBUF and SO_RCVBUF using a best effort approach If we fail to set any socket's buffer size, try again with a smaller value and keep going until it succeeds. This is better than just giving up or, even worse, abort the creation of a socket (ospf6d and ripd). Fix broken ospf6d on FreeBSD. Signed-off-by: Renato Westphal Signed-off-by: David Lamparter --- ripngd/ripngd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ripngd/ripngd.c') diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index 82c487748..4d59ef203 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -111,9 +111,7 @@ ripng_make_socket (void) return sock; } - ret = setsockopt_so_recvbuf (sock, 8096); - if (ret < 0) - return ret; + setsockopt_so_recvbuf (sock, 8096); ret = setsockopt_ipv6_pktinfo (sock, 1); if (ret < 0) return ret; -- cgit v1.2.3