Commit 8d056c34 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Use 255 as the outgoing hop count.

parent 2dfddbf2
...@@ -36,7 +36,7 @@ babel_socket(int port) ...@@ -36,7 +36,7 @@ babel_socket(int port)
struct sockaddr_in6 sin6; struct sockaddr_in6 sin6;
int s, rc; int s, rc;
int saved_errno; int saved_errno;
int one = 1, zero = 0; int one = 1, zero = 0, twofiftyfive = 255;
s = socket(PF_INET6, SOCK_DGRAM, 0); s = socket(PF_INET6, SOCK_DGRAM, 0);
if(s < 0) if(s < 0)
...@@ -58,6 +58,16 @@ babel_socket(int port) ...@@ -58,6 +58,16 @@ babel_socket(int port)
if(rc < 0) if(rc < 0)
goto fail; goto fail;
rc = setsockopt(s, IPPROTO_IPV6, IPV6_UNICAST_HOPS,
&twofiftyfive, sizeof(twofiftyfive));
if(rc < 0)
goto fail;
rc = setsockopt(s, IPPROTO_IPV6, IPV6_MULTICAST_HOPS,
&twofiftyfive, sizeof(twofiftyfive));
if(rc < 0)
goto fail;
rc = fcntl(s, F_GETFL, 0); rc = fcntl(s, F_GETFL, 0);
if(rc < 0) if(rc < 0)
goto fail; goto fail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment