Commit a67283b7 authored by David S. Miller's avatar David S. Miller

[IPV4]: Fix route copying during redirects.

parent ace40f57
......@@ -958,12 +958,15 @@ void ip_rt_redirect(u32 old_gw, u32 daddr, u32 new_gw,
INIT_RCU_HEAD(&rt->u.dst.rcu_head);
rt->u.dst.__use = 1;
atomic_set(&rt->u.dst.__refcnt, 1);
rt->u.dst.child = NULL;
if (rt->u.dst.dev)
dev_hold(rt->u.dst.dev);
rt->u.dst.obsolete = 0;
rt->u.dst.lastuse = jiffies;
rt->u.dst.path = &rt->u.dst;
rt->u.dst.neighbour = NULL;
rt->u.dst.hh = NULL;
rt->u.dst.obsolete = 0;
rt->u.dst.xfrm = NULL;
rt->rt_flags |= RTCF_REDIRECTED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment