From 338b8e914ab1dc30f56f5bcbabd525d547bbc1ea Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Mon, 8 Apr 2019 13:08:00 -0300 Subject: *: setting the socket send/recv buffer sizes doesn't need elevated privs The less code running under elevated privileges the better. Signed-off-by: Renato Westphal --- ospfd/ospf_network.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ospfd') diff --git a/ospfd/ospf_network.c b/ospfd/ospf_network.c index e30bb0ffe..1415a6e8b 100644 --- a/ospfd/ospf_network.c +++ b/ospfd/ospf_network.c @@ -234,11 +234,11 @@ int ospf_sock_init(struct ospf *ospf) flog_err(EC_LIB_SOCKET, "Can't set pktinfo option for fd %d", ospf_sock); - - setsockopt_so_sendbuf(ospf_sock, bufsize); - setsockopt_so_recvbuf(ospf_sock, bufsize); } + setsockopt_so_sendbuf(ospf_sock, bufsize); + setsockopt_so_recvbuf(ospf_sock, bufsize); + ospf->fd = ospf_sock; return ret; } -- cgit v1.2.3