ipv6: Fix default multicast hops setting.
authorDavid S. Miller <davem@davemloft.net>
Tue, 4 May 2010 06:42:27 +0000 (23:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 May 2010 06:42:27 +0000 (23:42 -0700)
As per RFC 3493 the default multicast hops setting
for a socket should be "1" just like ipv4.

Ironically we have a IPV6_DEFAULT_MCASTHOPS macro
it just wasn't being used.

Reported-by: Elliot Hughes <enh@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/af_inet6.c

index 3192aa02ba5d3f55271ab2e804bc00776172cb0b..3f9e86b15e0d867e1b85125b4521edbc0092054d 100644 (file)
@@ -200,7 +200,7 @@ lookup_protocol:
 
        inet_sk(sk)->pinet6 = np = inet6_sk_generic(sk);
        np->hop_limit   = -1;
-       np->mcast_hops  = -1;
+       np->mcast_hops  = IPV6_DEFAULT_MCASTHOPS;
        np->mc_loop     = 1;
        np->pmtudisc    = IPV6_PMTUDISC_WANT;
        np->ipv6only    = net->ipv6.sysctl.bindv6only;