diff options
author | David S. Miller <davem@davemloft.net> | 2012-06-27 20:05:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-27 20:05:06 -0400 |
commit | c10237e077cef50e925f052e49f3b4fead9d71f9 (patch) | |
tree | 5b7418f3a31165ea2e7d119782cad0745cd45792 /net/ipv4/route.c | |
parent | e440cf2ca0a1b075c64016240d46c3aa9d877bbf (diff) |
Revert "ipv4: tcp: dont cache unconfirmed intput dst"
This reverts commit c074da2810c118b3812f32d6754bd9ead2f169e7.
This change has several unwanted side effects:
1) Sockets will cache the DST_NOCACHE route in sk->sk_rx_dst and we'll
thus never create a real cached route.
2) All TCP traffic will use DST_NOCACHE and never use the routing
cache at all.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index fdc7900f9d7a..81533e3a23d1 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -2214,7 +2214,7 @@ static int ip_mkroute_input(struct sk_buff *skb, | |||
2214 | */ | 2214 | */ |
2215 | 2215 | ||
2216 | static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr, | 2216 | static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr, |
2217 | u8 tos, struct net_device *dev, bool nocache) | 2217 | u8 tos, struct net_device *dev) |
2218 | { | 2218 | { |
2219 | struct fib_result res; | 2219 | struct fib_result res; |
2220 | struct in_device *in_dev = __in_dev_get_rcu(dev); | 2220 | struct in_device *in_dev = __in_dev_get_rcu(dev); |
@@ -2353,8 +2353,6 @@ local_input: | |||
2353 | rth->dst.error= -err; | 2353 | rth->dst.error= -err; |
2354 | rth->rt_flags &= ~RTCF_LOCAL; | 2354 | rth->rt_flags &= ~RTCF_LOCAL; |
2355 | } | 2355 | } |
2356 | if (nocache) | ||
2357 | rth->dst.flags |= DST_NOCACHE; | ||
2358 | hash = rt_hash(daddr, saddr, fl4.flowi4_iif, rt_genid(net)); | 2356 | hash = rt_hash(daddr, saddr, fl4.flowi4_iif, rt_genid(net)); |
2359 | rth = rt_intern_hash(hash, rth, skb, fl4.flowi4_iif); | 2357 | rth = rt_intern_hash(hash, rth, skb, fl4.flowi4_iif); |
2360 | err = 0; | 2358 | err = 0; |
@@ -2397,7 +2395,7 @@ martian_source_keep_err: | |||
2397 | } | 2395 | } |
2398 | 2396 | ||
2399 | int ip_route_input_common(struct sk_buff *skb, __be32 daddr, __be32 saddr, | 2397 | int ip_route_input_common(struct sk_buff *skb, __be32 daddr, __be32 saddr, |
2400 | u8 tos, struct net_device *dev, bool noref, bool nocache) | 2398 | u8 tos, struct net_device *dev, bool noref) |
2401 | { | 2399 | { |
2402 | struct rtable *rth; | 2400 | struct rtable *rth; |
2403 | unsigned int hash; | 2401 | unsigned int hash; |
@@ -2473,7 +2471,7 @@ skip_cache: | |||
2473 | rcu_read_unlock(); | 2471 | rcu_read_unlock(); |
2474 | return -EINVAL; | 2472 | return -EINVAL; |
2475 | } | 2473 | } |
2476 | res = ip_route_input_slow(skb, daddr, saddr, tos, dev, nocache); | 2474 | res = ip_route_input_slow(skb, daddr, saddr, tos, dev); |
2477 | rcu_read_unlock(); | 2475 | rcu_read_unlock(); |
2478 | return res; | 2476 | return res; |
2479 | } | 2477 | } |