diff options
Diffstat (limited to 'net/ipv4/route.c')
| -rw-r--r-- | net/ipv4/route.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index c035251beb07..82cf2a722b23 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
| @@ -70,7 +70,6 @@ | |||
| 70 | #include <linux/types.h> | 70 | #include <linux/types.h> |
| 71 | #include <linux/kernel.h> | 71 | #include <linux/kernel.h> |
| 72 | #include <linux/mm.h> | 72 | #include <linux/mm.h> |
| 73 | #include <linux/bootmem.h> | ||
| 74 | #include <linux/string.h> | 73 | #include <linux/string.h> |
| 75 | #include <linux/socket.h> | 74 | #include <linux/socket.h> |
| 76 | #include <linux/sockios.h> | 75 | #include <linux/sockios.h> |
| @@ -80,7 +79,6 @@ | |||
| 80 | #include <linux/netdevice.h> | 79 | #include <linux/netdevice.h> |
| 81 | #include <linux/proc_fs.h> | 80 | #include <linux/proc_fs.h> |
| 82 | #include <linux/init.h> | 81 | #include <linux/init.h> |
| 83 | #include <linux/workqueue.h> | ||
| 84 | #include <linux/skbuff.h> | 82 | #include <linux/skbuff.h> |
| 85 | #include <linux/inetdevice.h> | 83 | #include <linux/inetdevice.h> |
| 86 | #include <linux/igmp.h> | 84 | #include <linux/igmp.h> |
| @@ -88,11 +86,9 @@ | |||
| 88 | #include <linux/mroute.h> | 86 | #include <linux/mroute.h> |
| 89 | #include <linux/netfilter_ipv4.h> | 87 | #include <linux/netfilter_ipv4.h> |
| 90 | #include <linux/random.h> | 88 | #include <linux/random.h> |
| 91 | #include <linux/jhash.h> | ||
| 92 | #include <linux/rcupdate.h> | 89 | #include <linux/rcupdate.h> |
| 93 | #include <linux/times.h> | 90 | #include <linux/times.h> |
| 94 | #include <linux/slab.h> | 91 | #include <linux/slab.h> |
| 95 | #include <linux/prefetch.h> | ||
| 96 | #include <net/dst.h> | 92 | #include <net/dst.h> |
| 97 | #include <net/net_namespace.h> | 93 | #include <net/net_namespace.h> |
| 98 | #include <net/protocol.h> | 94 | #include <net/protocol.h> |
| @@ -938,12 +934,14 @@ static u32 __ip_rt_update_pmtu(struct rtable *rt, struct flowi4 *fl4, u32 mtu) | |||
| 938 | if (mtu < ip_rt_min_pmtu) | 934 | if (mtu < ip_rt_min_pmtu) |
| 939 | mtu = ip_rt_min_pmtu; | 935 | mtu = ip_rt_min_pmtu; |
| 940 | 936 | ||
| 937 | rcu_read_lock(); | ||
| 941 | if (fib_lookup(dev_net(rt->dst.dev), fl4, &res) == 0) { | 938 | if (fib_lookup(dev_net(rt->dst.dev), fl4, &res) == 0) { |
| 942 | struct fib_nh *nh = &FIB_RES_NH(res); | 939 | struct fib_nh *nh = &FIB_RES_NH(res); |
| 943 | 940 | ||
| 944 | update_or_create_fnhe(nh, fl4->daddr, 0, mtu, | 941 | update_or_create_fnhe(nh, fl4->daddr, 0, mtu, |
| 945 | jiffies + ip_rt_mtu_expires); | 942 | jiffies + ip_rt_mtu_expires); |
| 946 | } | 943 | } |
| 944 | rcu_read_unlock(); | ||
| 947 | return mtu; | 945 | return mtu; |
| 948 | } | 946 | } |
| 949 | 947 | ||
| @@ -960,7 +958,7 @@ static void ip_rt_update_pmtu(struct dst_entry *dst, struct sock *sk, | |||
| 960 | dst->obsolete = DST_OBSOLETE_KILL; | 958 | dst->obsolete = DST_OBSOLETE_KILL; |
| 961 | } else { | 959 | } else { |
| 962 | rt->rt_pmtu = mtu; | 960 | rt->rt_pmtu = mtu; |
| 963 | dst_set_expires(&rt->dst, ip_rt_mtu_expires); | 961 | rt->dst.expires = max(1UL, jiffies + ip_rt_mtu_expires); |
| 964 | } | 962 | } |
| 965 | } | 963 | } |
| 966 | 964 | ||
| @@ -1267,7 +1265,7 @@ static void ipv4_dst_destroy(struct dst_entry *dst) | |||
| 1267 | { | 1265 | { |
| 1268 | struct rtable *rt = (struct rtable *) dst; | 1266 | struct rtable *rt = (struct rtable *) dst; |
| 1269 | 1267 | ||
| 1270 | if (dst->flags & DST_NOCACHE) { | 1268 | if (!list_empty(&rt->rt_uncached)) { |
| 1271 | spin_lock_bh(&rt_uncached_lock); | 1269 | spin_lock_bh(&rt_uncached_lock); |
| 1272 | list_del(&rt->rt_uncached); | 1270 | list_del(&rt->rt_uncached); |
| 1273 | spin_unlock_bh(&rt_uncached_lock); | 1271 | spin_unlock_bh(&rt_uncached_lock); |
| @@ -2032,7 +2030,6 @@ struct rtable *__ip_route_output_key(struct net *net, struct flowi4 *fl4) | |||
| 2032 | } | 2030 | } |
| 2033 | dev_out = net->loopback_dev; | 2031 | dev_out = net->loopback_dev; |
| 2034 | fl4->flowi4_oif = dev_out->ifindex; | 2032 | fl4->flowi4_oif = dev_out->ifindex; |
| 2035 | res.fi = NULL; | ||
| 2036 | flags |= RTCF_LOCAL; | 2033 | flags |= RTCF_LOCAL; |
| 2037 | goto make_route; | 2034 | goto make_route; |
| 2038 | } | 2035 | } |
