Commit 40aa7b90 authored by YOSHIFUJI Hideaki's avatar YOSHIFUJI Hideaki Committed by David S. Miller

[IPV6] ROUTE: Use &rt->u.dst instead of cast.

Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
parent 33e93c96
...@@ -63,7 +63,7 @@ struct dst_entry *fib6_rule_lookup(struct flowi *fl, int flags, ...@@ -63,7 +63,7 @@ struct dst_entry *fib6_rule_lookup(struct flowi *fl, int flags,
fib_rule_put(arg.rule); fib_rule_put(arg.rule);
if (arg.result) if (arg.result)
return (struct dst_entry *) arg.result; return arg.result;
dst_hold(&ip6_null_entry.u.dst); dst_hold(&ip6_null_entry.u.dst);
return &ip6_null_entry.u.dst; return &ip6_null_entry.u.dst;
......
...@@ -940,7 +940,7 @@ struct dst_entry *ndisc_dst_alloc(struct net_device *dev, ...@@ -940,7 +940,7 @@ struct dst_entry *ndisc_dst_alloc(struct net_device *dev,
fib6_force_start_gc(); fib6_force_start_gc();
out: out:
return (struct dst_entry *)rt; return &rt->u.dst;
} }
int ndisc_dst_gc(int *more) int ndisc_dst_gc(int *more)
...@@ -1223,7 +1223,7 @@ out: ...@@ -1223,7 +1223,7 @@ out:
if (idev) if (idev)
in6_dev_put(idev); in6_dev_put(idev);
if (rt) if (rt)
dst_free((struct dst_entry *) rt); dst_free(&rt->u.dst);
return err; return err;
} }
...@@ -1822,7 +1822,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, ...@@ -1822,7 +1822,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
rt->rt6i_flags |= RTF_LOCAL; rt->rt6i_flags |= RTF_LOCAL;
rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway); rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway);
if (rt->rt6i_nexthop == NULL) { if (rt->rt6i_nexthop == NULL) {
dst_free((struct dst_entry *) rt); dst_free(&rt->u.dst);
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
} }
......
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