diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/route.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index f428935c50db..f8da28278014 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1776,8 +1776,12 @@ local_input: | |||
1776 | rth->dst.error= -err; | 1776 | rth->dst.error= -err; |
1777 | rth->rt_flags &= ~RTCF_LOCAL; | 1777 | rth->rt_flags &= ~RTCF_LOCAL; |
1778 | } | 1778 | } |
1779 | if (do_cache) | 1779 | if (do_cache) { |
1780 | rt_cache_route(&FIB_RES_NH(res), rth); | 1780 | if (unlikely(!rt_cache_route(&FIB_RES_NH(res), rth))) { |
1781 | rth->dst.flags |= DST_NOCACHE; | ||
1782 | rt_add_uncached_list(rth); | ||
1783 | } | ||
1784 | } | ||
1781 | skb_dst_set(skb, &rth->dst); | 1785 | skb_dst_set(skb, &rth->dst); |
1782 | err = 0; | 1786 | err = 0; |
1783 | goto out; | 1787 | goto out; |