Skip to content

Commit

Permalink
Set hop count to 1.
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliusz Chroboczek committed Jun 29, 2007
1 parent c4e28de commit 7107cd5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ babel_socket(int port)
struct sockaddr_in6 sin6;
int s, rc;
int saved_errno;
int one = 1, zero = 0, twofiftyfive = 255;
int one = 1, zero = 0;

s = socket(PF_INET6, SOCK_DGRAM, 0);
if(s < 0)
Expand All @@ -56,12 +56,12 @@ babel_socket(int port)
goto fail;

rc = setsockopt(s, IPPROTO_IPV6, IPV6_UNICAST_HOPS,
&twofiftyfive, sizeof(twofiftyfive));
&one, sizeof(one));
if(rc < 0)
goto fail;

rc = setsockopt(s, IPPROTO_IPV6, IPV6_MULTICAST_HOPS,
&twofiftyfive, sizeof(twofiftyfive));
&one, sizeof(one));
if(rc < 0)
goto fail;

Expand Down

0 comments on commit 7107cd5

Please sign in to comment.