diff options
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
| -rw-r--r-- | net/xfrm/xfrm_policy.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index f06253969972..2746b62a8944 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
| @@ -1573,6 +1573,14 @@ static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy, | |||
| 1573 | goto put_states; | 1573 | goto put_states; |
| 1574 | } | 1574 | } |
| 1575 | 1575 | ||
| 1576 | if (!dst_prev) | ||
| 1577 | dst0 = dst1; | ||
| 1578 | else | ||
| 1579 | /* Ref count is taken during xfrm_alloc_dst() | ||
| 1580 | * No need to do dst_clone() on dst1 | ||
| 1581 | */ | ||
| 1582 | dst_prev->child = dst1; | ||
| 1583 | |||
| 1576 | if (xfrm[i]->sel.family == AF_UNSPEC) { | 1584 | if (xfrm[i]->sel.family == AF_UNSPEC) { |
| 1577 | inner_mode = xfrm_ip2inner_mode(xfrm[i], | 1585 | inner_mode = xfrm_ip2inner_mode(xfrm[i], |
| 1578 | xfrm_af2proto(family)); | 1586 | xfrm_af2proto(family)); |
| @@ -1584,14 +1592,6 @@ static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy, | |||
| 1584 | } else | 1592 | } else |
| 1585 | inner_mode = xfrm[i]->inner_mode; | 1593 | inner_mode = xfrm[i]->inner_mode; |
| 1586 | 1594 | ||
| 1587 | if (!dst_prev) | ||
| 1588 | dst0 = dst1; | ||
| 1589 | else | ||
| 1590 | /* Ref count is taken during xfrm_alloc_dst() | ||
| 1591 | * No need to do dst_clone() on dst1 | ||
| 1592 | */ | ||
| 1593 | dst_prev->child = dst1; | ||
| 1594 | |||
| 1595 | xdst->route = dst; | 1595 | xdst->route = dst; |
| 1596 | dst_copy_metrics(dst1, dst); | 1596 | dst_copy_metrics(dst1, dst); |
| 1597 | 1597 | ||
