|
|
@@ -2214,7 +2214,7 @@ static int ip_mkroute_input(struct sk_buff *skb,
|
|
|
*/
|
|
|
|
|
|
static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
|
|
|
- u8 tos, struct net_device *dev)
|
|
|
+ u8 tos, struct net_device *dev, bool nocache)
|
|
|
{
|
|
|
struct fib_result res;
|
|
|
struct in_device *in_dev = __in_dev_get_rcu(dev);
|
|
|
@@ -2353,6 +2353,8 @@ out: return err;
|
|
|
rth->dst.error= -err;
|
|
|
rth->rt_flags &= ~RTCF_LOCAL;
|
|
|
}
|
|
|
+ if (nocache)
|
|
|
+ rth->dst.flags |= DST_NOCACHE;
|
|
|
hash = rt_hash(daddr, saddr, fl4.flowi4_iif, rt_genid(net));
|
|
|
rth = rt_intern_hash(hash, rth, skb, fl4.flowi4_iif);
|
|
|
err = 0;
|
|
|
@@ -2395,7 +2397,7 @@ out: return err;
|
|
|
}
|
|
|
|
|
|
int ip_route_input_common(struct sk_buff *skb, __be32 daddr, __be32 saddr,
|
|
|
- u8 tos, struct net_device *dev, bool noref)
|
|
|
+ u8 tos, struct net_device *dev, bool noref, bool nocache)
|
|
|
{
|
|
|
struct rtable *rth;
|
|
|
unsigned int hash;
|
|
|
@@ -2471,7 +2473,7 @@ int ip_route_input_common(struct sk_buff *skb, __be32 daddr, __be32 saddr,
|
|
|
rcu_read_unlock();
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
- res = ip_route_input_slow(skb, daddr, saddr, tos, dev);
|
|
|
+ res = ip_route_input_slow(skb, daddr, saddr, tos, dev, nocache);
|
|
|
rcu_read_unlock();
|
|
|
return res;
|
|
|
}
|