Commit f7e938b4 authored by Hideaki Yoshifuji's avatar Hideaki Yoshifuji

[IPV6]: Get reference to neigh/dev when building ndisc DST.

parent da0fc845
...@@ -567,6 +567,11 @@ struct dst_entry *ndisc_dst_alloc(struct net_device *dev, ...@@ -567,6 +567,11 @@ struct dst_entry *ndisc_dst_alloc(struct net_device *dev,
if (unlikely(rt == NULL)) if (unlikely(rt == NULL))
goto out; goto out;
if (dev)
dev_hold(dev);
if (neigh)
neigh_hold(neigh);
rt->rt6i_dev = dev; rt->rt6i_dev = dev;
rt->rt6i_nexthop = neigh; rt->rt6i_nexthop = neigh;
rt->rt6i_expires = 0; rt->rt6i_expires = 0;
......
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