summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_network.c
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@users.noreply.github.com>2020-11-03 15:59:38 +0100
committerGitHub <noreply@github.com>2020-11-03 15:59:38 +0100
commit7c62dc76d4e78cce352d511fea89f908a9ee30ce (patch)
treeb7eadd961c71dd302d2c1800cb1d6abee2677c38 /ospf6d/ospf6_network.c
parentMerge pull request #6795 from rgirada/ospf_db_json (diff)
parentospf6d : Transformation changes for ospf6 vrf support. (diff)
downloadfrr-7c62dc76d4e78cce352d511fea89f908a9ee30ce.tar.xz
frr-7c62dc76d4e78cce352d511fea89f908a9ee30ce.zip
Merge pull request #7261 from Niral-Networks/niral_dev_vrf_ospf6
ospf6d : Transformation changes for ospf6 vrf support.
Diffstat (limited to 'ospf6d/ospf6_network.c')
-rw-r--r--ospf6d/ospf6_network.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ospf6d/ospf6_network.c b/ospf6d/ospf6_network.c
index 94e80b0f2..76f98fecd 100644
--- a/ospf6d/ospf6_network.c
+++ b/ospf6d/ospf6_network.c
@@ -124,21 +124,20 @@ int ospf6_serv_sock(struct ospf6 *ospf6)
}
/* ospf6 set socket option */
-int ospf6_sso(ifindex_t ifindex, struct in6_addr *group, int option)
+int ospf6_sso(ifindex_t ifindex, struct in6_addr *group, int option, int sockfd)
{
struct ipv6_mreq mreq6;
int ret;
int bufsize = (8 * 1024 * 1024);
- if (ospf6->fd == -1)
+ if (sockfd == -1)
return -1;
assert(ifindex);
mreq6.ipv6mr_interface = ifindex;
memcpy(&mreq6.ipv6mr_multiaddr, group, sizeof(struct in6_addr));
- ret = setsockopt(ospf6->fd, IPPROTO_IPV6, option, &mreq6,
- sizeof(mreq6));
+ ret = setsockopt(sockfd, IPPROTO_IPV6, option, &mreq6, sizeof(mreq6));
if (ret < 0) {
flog_err_sys(
EC_LIB_SOCKET,
@@ -147,8 +146,8 @@ int ospf6_sso(ifindex_t ifindex, struct in6_addr *group, int option)
return ret;
}
- setsockopt_so_sendbuf(ospf6->fd, bufsize);
- setsockopt_so_recvbuf(ospf6->fd, bufsize);
+ setsockopt_so_sendbuf(sockfd, bufsize);
+ setsockopt_so_recvbuf(sockfd, bufsize);
return 0;
}