diff options
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
-rw-r--r-- | net/xfrm/xfrm_policy.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index c5a5165a5927..387848e90078 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -585,6 +585,7 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl) | |||
585 | xfrm_pol_hold(policy); | 585 | xfrm_pol_hold(policy); |
586 | net->xfrm.policy_count[dir]++; | 586 | net->xfrm.policy_count[dir]++; |
587 | atomic_inc(&flow_cache_genid); | 587 | atomic_inc(&flow_cache_genid); |
588 | rt_genid_bump(net); | ||
588 | if (delpol) | 589 | if (delpol) |
589 | __xfrm_policy_unlink(delpol, dir); | 590 | __xfrm_policy_unlink(delpol, dir); |
590 | policy->index = delpol ? delpol->index : xfrm_gen_index(net, dir); | 591 | policy->index = delpol ? delpol->index : xfrm_gen_index(net, dir); |
@@ -1357,6 +1358,8 @@ static inline struct xfrm_dst *xfrm_alloc_dst(struct net *net, int family) | |||
1357 | 1358 | ||
1358 | memset(dst + 1, 0, sizeof(*xdst) - sizeof(*dst)); | 1359 | memset(dst + 1, 0, sizeof(*xdst) - sizeof(*dst)); |
1359 | xdst->flo.ops = &xfrm_bundle_fc_ops; | 1360 | xdst->flo.ops = &xfrm_bundle_fc_ops; |
1361 | if (afinfo->init_dst) | ||
1362 | afinfo->init_dst(net, xdst); | ||
1360 | } else | 1363 | } else |
1361 | xdst = ERR_PTR(-ENOBUFS); | 1364 | xdst = ERR_PTR(-ENOBUFS); |
1362 | 1365 | ||
@@ -1761,7 +1764,7 @@ static struct dst_entry *make_blackhole(struct net *net, u16 family, | |||
1761 | 1764 | ||
1762 | if (!afinfo) { | 1765 | if (!afinfo) { |
1763 | dst_release(dst_orig); | 1766 | dst_release(dst_orig); |
1764 | ret = ERR_PTR(-EINVAL); | 1767 | return ERR_PTR(-EINVAL); |
1765 | } else { | 1768 | } else { |
1766 | ret = afinfo->blackhole_route(net, dst_orig); | 1769 | ret = afinfo->blackhole_route(net, dst_orig); |
1767 | } | 1770 | } |