Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44596
b: refs/heads/master
c: befffe9
h: refs/heads/master
v: v3
  • Loading branch information
Brian Haley authored and David S. Miller committed Dec 14, 2006
1 parent b85d061 commit 9a09c81
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 832e3ca62d6ee1893db05f5202c24ae5331e19ba
refs/heads/master: befffe901649e2cc421d0d150c4379d01658cf6b
23 changes: 19 additions & 4 deletions trunk/net/ipv6/ipv6_sockglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -978,12 +978,27 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
break;

case IPV6_UNICAST_HOPS:
val = np->hop_limit;
break;

case IPV6_MULTICAST_HOPS:
val = np->mcast_hops;
{
struct dst_entry *dst;

if (optname == IPV6_UNICAST_HOPS)
val = np->hop_limit;
else
val = np->mcast_hops;

dst = sk_dst_get(sk);
if (dst) {
if (val < 0)
val = dst_metric(dst, RTAX_HOPLIMIT);
if (val < 0)
val = ipv6_get_hoplimit(dst->dev);
dst_release(dst);
}
if (val < 0)
val = ipv6_devconf.hop_limit;
break;
}

case IPV6_MULTICAST_LOOP:
val = np->mc_loop;
Expand Down

0 comments on commit 9a09c81

Please sign in to comment.