|
@@ -435,12 +435,12 @@ static inline int ip_rt_proc_init(void)
|
|
|
|
|
|
static inline bool rt_is_expired(const struct rtable *rth)
|
|
|
{
|
|
|
- return rth->rt_genid != rt_genid(dev_net(rth->dst.dev));
|
|
|
+ return rth->rt_genid != rt_genid_ipv4(dev_net(rth->dst.dev));
|
|
|
}
|
|
|
|
|
|
void rt_cache_flush(struct net *net)
|
|
|
{
|
|
|
- rt_genid_bump(net);
|
|
|
+ rt_genid_bump_ipv4(net);
|
|
|
}
|
|
|
|
|
|
static struct neighbour *ipv4_neigh_lookup(const struct dst_entry *dst,
|
|
@@ -1458,7 +1458,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr,
|
|
|
#endif
|
|
|
rth->dst.output = ip_rt_bug;
|
|
|
|
|
|
- rth->rt_genid = rt_genid(dev_net(dev));
|
|
|
+ rth->rt_genid = rt_genid_ipv4(dev_net(dev));
|
|
|
rth->rt_flags = RTCF_MULTICAST;
|
|
|
rth->rt_type = RTN_MULTICAST;
|
|
|
rth->rt_is_input= 1;
|
|
@@ -1589,7 +1589,7 @@ static int __mkroute_input(struct sk_buff *skb,
|
|
|
goto cleanup;
|
|
|
}
|
|
|
|
|
|
- rth->rt_genid = rt_genid(dev_net(rth->dst.dev));
|
|
|
+ rth->rt_genid = rt_genid_ipv4(dev_net(rth->dst.dev));
|
|
|
rth->rt_flags = flags;
|
|
|
rth->rt_type = res->type;
|
|
|
rth->rt_is_input = 1;
|
|
@@ -1760,7 +1760,7 @@ local_input:
|
|
|
rth->dst.tclassid = itag;
|
|
|
#endif
|
|
|
|
|
|
- rth->rt_genid = rt_genid(net);
|
|
|
+ rth->rt_genid = rt_genid_ipv4(net);
|
|
|
rth->rt_flags = flags|RTCF_LOCAL;
|
|
|
rth->rt_type = res.type;
|
|
|
rth->rt_is_input = 1;
|
|
@@ -1945,7 +1945,7 @@ add:
|
|
|
|
|
|
rth->dst.output = ip_output;
|
|
|
|
|
|
- rth->rt_genid = rt_genid(dev_net(dev_out));
|
|
|
+ rth->rt_genid = rt_genid_ipv4(dev_net(dev_out));
|
|
|
rth->rt_flags = flags;
|
|
|
rth->rt_type = type;
|
|
|
rth->rt_is_input = 0;
|
|
@@ -2227,7 +2227,7 @@ struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_or
|
|
|
rt->rt_iif = ort->rt_iif;
|
|
|
rt->rt_pmtu = ort->rt_pmtu;
|
|
|
|
|
|
- rt->rt_genid = rt_genid(net);
|
|
|
+ rt->rt_genid = rt_genid_ipv4(net);
|
|
|
rt->rt_flags = ort->rt_flags;
|
|
|
rt->rt_type = ort->rt_type;
|
|
|
rt->rt_gateway = ort->rt_gateway;
|
|
@@ -2665,7 +2665,7 @@ static __net_initdata struct pernet_operations sysctl_route_ops = {
|
|
|
|
|
|
static __net_init int rt_genid_init(struct net *net)
|
|
|
{
|
|
|
- atomic_set(&net->rt_genid, 0);
|
|
|
+ atomic_set(&net->ipv4.rt_genid, 0);
|
|
|
atomic_set(&net->fnhe_genid, 0);
|
|
|
get_random_bytes(&net->ipv4.dev_addr_genid,
|
|
|
sizeof(net->ipv4.dev_addr_genid));
|