diff options
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 2a7423c39456..059f0531f7c1 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -2232,8 +2232,7 @@ static void ip6_link_failure(struct sk_buff *skb) | |||
2232 | if (rt) { | 2232 | if (rt) { |
2233 | rcu_read_lock(); | 2233 | rcu_read_lock(); |
2234 | if (rt->rt6i_flags & RTF_CACHE) { | 2234 | if (rt->rt6i_flags & RTF_CACHE) { |
2235 | if (dst_hold_safe(&rt->dst)) | 2235 | rt6_remove_exception_rt(rt); |
2236 | rt6_remove_exception_rt(rt); | ||
2237 | } else { | 2236 | } else { |
2238 | struct fib6_info *from; | 2237 | struct fib6_info *from; |
2239 | struct fib6_node *fn; | 2238 | struct fib6_node *fn; |
@@ -2360,10 +2359,13 @@ EXPORT_SYMBOL_GPL(ip6_update_pmtu); | |||
2360 | 2359 | ||
2361 | void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, __be32 mtu) | 2360 | void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, __be32 mtu) |
2362 | { | 2361 | { |
2362 | int oif = sk->sk_bound_dev_if; | ||
2363 | struct dst_entry *dst; | 2363 | struct dst_entry *dst; |
2364 | 2364 | ||
2365 | ip6_update_pmtu(skb, sock_net(sk), mtu, | 2365 | if (!oif && skb->dev) |
2366 | sk->sk_bound_dev_if, sk->sk_mark, sk->sk_uid); | 2366 | oif = l3mdev_master_ifindex(skb->dev); |
2367 | |||
2368 | ip6_update_pmtu(skb, sock_net(sk), mtu, oif, sk->sk_mark, sk->sk_uid); | ||
2367 | 2369 | ||
2368 | dst = __sk_dst_get(sk); | 2370 | dst = __sk_dst_get(sk); |
2369 | if (!dst || !dst->obsolete || | 2371 | if (!dst || !dst->obsolete || |
@@ -3214,8 +3216,8 @@ static int ip6_del_cached_rt(struct rt6_info *rt, struct fib6_config *cfg) | |||
3214 | if (cfg->fc_flags & RTF_GATEWAY && | 3216 | if (cfg->fc_flags & RTF_GATEWAY && |
3215 | !ipv6_addr_equal(&cfg->fc_gateway, &rt->rt6i_gateway)) | 3217 | !ipv6_addr_equal(&cfg->fc_gateway, &rt->rt6i_gateway)) |
3216 | goto out; | 3218 | goto out; |
3217 | if (dst_hold_safe(&rt->dst)) | 3219 | |
3218 | rc = rt6_remove_exception_rt(rt); | 3220 | rc = rt6_remove_exception_rt(rt); |
3219 | out: | 3221 | out: |
3220 | return rc; | 3222 | return rc; |
3221 | } | 3223 | } |