diff options
Diffstat (limited to 'net/decnet/dn_route.c')
-rw-r--r-- | net/decnet/dn_route.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 9f09d4fc2880..f489b081c25d 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -1125,13 +1125,10 @@ make_route: | |||
1125 | if (dev_out->flags & IFF_LOOPBACK) | 1125 | if (dev_out->flags & IFF_LOOPBACK) |
1126 | flags |= RTCF_LOCAL; | 1126 | flags |= RTCF_LOCAL; |
1127 | 1127 | ||
1128 | rt = dst_alloc(&dn_dst_ops, 0); | 1128 | rt = dst_alloc(&dn_dst_ops, dev_out, 1, 0, DST_HOST); |
1129 | if (rt == NULL) | 1129 | if (rt == NULL) |
1130 | goto e_nobufs; | 1130 | goto e_nobufs; |
1131 | 1131 | ||
1132 | atomic_set(&rt->dst.__refcnt, 1); | ||
1133 | rt->dst.flags = DST_HOST; | ||
1134 | |||
1135 | rt->fld.saddr = oldflp->saddr; | 1132 | rt->fld.saddr = oldflp->saddr; |
1136 | rt->fld.daddr = oldflp->daddr; | 1133 | rt->fld.daddr = oldflp->daddr; |
1137 | rt->fld.flowidn_oif = oldflp->flowidn_oif; | 1134 | rt->fld.flowidn_oif = oldflp->flowidn_oif; |
@@ -1146,8 +1143,6 @@ make_route: | |||
1146 | rt->rt_dst_map = fld.daddr; | 1143 | rt->rt_dst_map = fld.daddr; |
1147 | rt->rt_src_map = fld.saddr; | 1144 | rt->rt_src_map = fld.saddr; |
1148 | 1145 | ||
1149 | rt->dst.dev = dev_out; | ||
1150 | dev_hold(dev_out); | ||
1151 | rt->dst.neighbour = neigh; | 1146 | rt->dst.neighbour = neigh; |
1152 | neigh = NULL; | 1147 | neigh = NULL; |
1153 | 1148 | ||
@@ -1399,7 +1394,7 @@ static int dn_route_input_slow(struct sk_buff *skb) | |||
1399 | } | 1394 | } |
1400 | 1395 | ||
1401 | make_route: | 1396 | make_route: |
1402 | rt = dst_alloc(&dn_dst_ops, 0); | 1397 | rt = dst_alloc(&dn_dst_ops, out_dev, 0, 0, DST_HOST); |
1403 | if (rt == NULL) | 1398 | if (rt == NULL) |
1404 | goto e_nobufs; | 1399 | goto e_nobufs; |
1405 | 1400 | ||
@@ -1419,9 +1414,7 @@ make_route: | |||
1419 | rt->fld.flowidn_iif = in_dev->ifindex; | 1414 | rt->fld.flowidn_iif = in_dev->ifindex; |
1420 | rt->fld.flowidn_mark = fld.flowidn_mark; | 1415 | rt->fld.flowidn_mark = fld.flowidn_mark; |
1421 | 1416 | ||
1422 | rt->dst.flags = DST_HOST; | ||
1423 | rt->dst.neighbour = neigh; | 1417 | rt->dst.neighbour = neigh; |
1424 | rt->dst.dev = out_dev; | ||
1425 | rt->dst.lastuse = jiffies; | 1418 | rt->dst.lastuse = jiffies; |
1426 | rt->dst.output = dn_rt_bug; | 1419 | rt->dst.output = dn_rt_bug; |
1427 | switch(res.type) { | 1420 | switch(res.type) { |
@@ -1440,8 +1433,6 @@ make_route: | |||
1440 | rt->dst.input = dst_discard; | 1433 | rt->dst.input = dst_discard; |
1441 | } | 1434 | } |
1442 | rt->rt_flags = flags; | 1435 | rt->rt_flags = flags; |
1443 | if (rt->dst.dev) | ||
1444 | dev_hold(rt->dst.dev); | ||
1445 | 1436 | ||
1446 | err = dn_rt_set_next_hop(rt, &res); | 1437 | err = dn_rt_set_next_hop(rt, &res); |
1447 | if (err) | 1438 | if (err) |