diff options
Diffstat (limited to 'ospf6d/ospf6_network.c')
-rw-r--r-- | ospf6d/ospf6_network.c | 38 |
1 files changed, 2 insertions, 36 deletions
diff --git a/ospf6d/ospf6_network.c b/ospf6d/ospf6_network.c index 0d730c596..0217d6603 100644 --- a/ospf6d/ospf6_network.c +++ b/ospf6d/ospf6_network.c @@ -118,8 +118,6 @@ ospf6_sso (ifindex_t ifindex, struct in6_addr *group, int option) struct ipv6_mreq mreq6; int ret; int bufsize = (8 * 1024 * 1024); - int optval; - socklen_t optlen = sizeof(optval); assert (ifindex); mreq6.ipv6mr_interface = ifindex; @@ -134,40 +132,8 @@ ospf6_sso (ifindex_t ifindex, struct in6_addr *group, int option) return ret; } - if ((ret = setsockopt (ospf6_sock, SOL_SOCKET, SO_SNDBUF, - &bufsize, sizeof (bufsize))) < 0) - { - zlog_err ("Couldn't increase raw wbuf size: %s\n", safe_strerror(errno)); - return ret; - } - - if ((ret = getsockopt (ospf6_sock, SOL_SOCKET, SO_SNDBUF, - &optval, &optlen)) < 0) - { - zlog_err ("getsockopt of SO_SNDBUF failed with error %s\n", safe_strerror(errno)); - return ret; - } - else if (optval < bufsize) - { - zlog_err ("Unable to SO_SNDBUF to %d, set to %d\n", bufsize, optval); - } - - if ((ret = setsockopt (ospf6_sock, SOL_SOCKET, SO_RCVBUF, - &bufsize, sizeof (bufsize))) < 0) - { - zlog_err ("Couldn't increase raw rbuf size: %s\n", safe_strerror(errno)); - } - - if ((ret = getsockopt (ospf6_sock, SOL_SOCKET, SO_RCVBUF, - &optval, &optlen)) < 0) - { - zlog_err ("getsockopt of SO_RCVBUF failed with error %s\n", safe_strerror(errno)); - return ret; - } - else if (optval < bufsize) - { - zlog_err ("Unable to SO_RCVBUF to %d, set to %d\n", bufsize, optval); - } + setsockopt_so_sendbuf (ospf6_sock, bufsize); + setsockopt_so_recvbuf (ospf6_sock, bufsize); return 0; } |