diff options
author | harios_niral <hari@niralnetworks.com> | 2020-10-08 07:38:43 +0200 |
---|---|---|
committer | harios_niral <hari@niralnetworks.com> | 2020-10-31 07:50:08 +0100 |
commit | beadc736bbd27da5d2bb6f2770fceea7af227ef3 (patch) | |
tree | cd3b630a3556f93fd68c80d087051882ae56e138 /ospf6d/ospf6_network.c | |
parent | Merge pull request #7333 from mjstapp/fix_multi_connected (diff) | |
download | frr-beadc736bbd27da5d2bb6f2770fceea7af227ef3.tar.xz frr-beadc736bbd27da5d2bb6f2770fceea7af227ef3.zip |
ospf6d : Transformation changes for ospf6 vrf support.
1. All the changes are related to handle ospf6 with different vrf.
2. The dependancy of global ospf6 is removed.
Co-authored-by: Kaushik <kaushik@niralnetworks.com>
Signed-off-by: harios_niral <hari@niralnetworks.com>
Diffstat (limited to 'ospf6d/ospf6_network.c')
-rw-r--r-- | ospf6d/ospf6_network.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ospf6d/ospf6_network.c b/ospf6d/ospf6_network.c index 6c83881bf..e3e8cdbea 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; } |