summaryrefslogtreecommitdiffstats
path: root/ripngd/ripngd.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2016-12-07 16:21:46 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2016-12-08 12:50:25 +0100
commit6228a3b8743ea2a6589070de926588e2ceb0f27f (patch)
tree1d4f333086f14d333c2aae31b1c01a27e55e8b0b /ripngd/ripngd.c
parentospfd: set the OSPF socket's send buffer size only once (diff)
downloadfrr-6228a3b8743ea2a6589070de926588e2ceb0f27f.tar.xz
frr-6228a3b8743ea2a6589070de926588e2ceb0f27f.zip
*: 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 <renato@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to '')
-rw-r--r--ripngd/ripngd.c4
1 files changed, 1 insertions, 3 deletions
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;