Skip to content
Snippets Groups Projects
Commit c9bfd004 authored by ahedberg's avatar ahedberg
Browse files

re-add grpc_set_socket_ipv6...

parent 8d7cff41
No related branches found
No related tags found
No related merge requests found
...@@ -99,6 +99,16 @@ int grpc_set_socket_ip_pktinfo_if_possible(int fd) { ...@@ -99,6 +99,16 @@ int grpc_set_socket_ip_pktinfo_if_possible(int fd) {
#endif #endif
} }
int grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd) {
#ifdef GPR_HAVE_IPV6_RECVPKTINFO
int get_local_ip = 1;
return setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &get_local_ip,
sizeof(get_local_ip));
#else
return 1;
#endif
}
/* set a socket to close on exec */ /* set a socket to close on exec */
int grpc_set_socket_cloexec(int fd, int close_on_exec) { int grpc_set_socket_cloexec(int fd, int close_on_exec) {
int oldflags = fcntl(fd, F_GETFD, 0); int oldflags = fcntl(fd, F_GETFD, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment