|
|
|
@ -92,8 +92,8 @@ int grpc_set_socket_no_sigpipe_if_possible(int fd) { |
|
|
|
|
int grpc_set_socket_ip_pktinfo_if_possible(int fd) { |
|
|
|
|
#ifdef GPR_HAVE_IP_PKTINFO |
|
|
|
|
int get_local_ip = 1; |
|
|
|
|
return setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &get_local_ip, |
|
|
|
|
sizeof(get_local_ip)); |
|
|
|
|
return 0 == setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &get_local_ip, |
|
|
|
|
sizeof(get_local_ip)); |
|
|
|
|
#else |
|
|
|
|
return 1; |
|
|
|
|
#endif |
|
|
|
@ -102,8 +102,8 @@ int grpc_set_socket_ip_pktinfo_if_possible(int fd) { |
|
|
|
|
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)); |
|
|
|
|
return 0 == setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &get_local_ip, |
|
|
|
|
sizeof(get_local_ip)); |
|
|
|
|
#else |
|
|
|
|
return 1; |
|
|
|
|
#endif |
|
|
|
|