Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202917
b: refs/heads/master
c: c68f24c
h: refs/heads/master
i:
  202915: 27f3dee
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jun 15, 2010
1 parent 6bdff6b commit 645b8b8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 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: f6bc7d9e4760324258ad5f5d147e79db8442842e
refs/heads/master: c68f24cc354050415c5ea543cd19ea5424463a2f
19 changes: 11 additions & 8 deletions trunk/net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1084,11 +1084,11 @@ static int ipv6_get_mtu(struct net_device *dev)
int mtu = IPV6_MIN_MTU;
struct inet6_dev *idev;

idev = in6_dev_get(dev);
if (idev) {
rcu_read_lock();
idev = __in6_dev_get(dev);
if (idev)
mtu = idev->cnf.mtu6;
in6_dev_put(idev);
}
rcu_read_unlock();
return mtu;
}

Expand All @@ -1097,12 +1097,15 @@ int ip6_dst_hoplimit(struct dst_entry *dst)
int hoplimit = dst_metric(dst, RTAX_HOPLIMIT);
if (hoplimit < 0) {
struct net_device *dev = dst->dev;
struct inet6_dev *idev = in6_dev_get(dev);
if (idev) {
struct inet6_dev *idev;

rcu_read_lock();
idev = __in6_dev_get(dev);
if (idev)
hoplimit = idev->cnf.hop_limit;
in6_dev_put(idev);
} else
else
hoplimit = dev_net(dev)->ipv6.devconf_all->hop_limit;
rcu_read_unlock();
}
return hoplimit;
}
Expand Down

0 comments on commit 645b8b8

Please sign in to comment.