aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/xfrm/xfrm_state.c')
-rw-r--r--net/xfrm/xfrm_state.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index f05371556cce..3da89c01ea71 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -78,6 +78,7 @@ static void xfrm_state_gc_destroy(struct xfrm_state *x)
78 kfree(x->ealg); 78 kfree(x->ealg);
79 kfree(x->calg); 79 kfree(x->calg);
80 kfree(x->encap); 80 kfree(x->encap);
81 kfree(x->coaddr);
81 if (x->mode) 82 if (x->mode)
82 xfrm_put_mode(x->mode); 83 xfrm_put_mode(x->mode);
83 if (x->type) { 84 if (x->type) {
@@ -603,6 +604,11 @@ out:
603 if (likely(x1->km.state == XFRM_STATE_VALID)) { 604 if (likely(x1->km.state == XFRM_STATE_VALID)) {
604 if (x->encap && x1->encap) 605 if (x->encap && x1->encap)
605 memcpy(x1->encap, x->encap, sizeof(*x1->encap)); 606 memcpy(x1->encap, x->encap, sizeof(*x1->encap));
607 if (x->coaddr && x1->coaddr) {
608 memcpy(x1->coaddr, x->coaddr, sizeof(*x1->coaddr));
609 }
610 if (!use_spi && memcmp(&x1->sel, &x->sel, sizeof(x1->sel)))
611 memcpy(&x1->sel, &x->sel, sizeof(x1->sel));
606 memcpy(&x1->lft, &x->lft, sizeof(x1->lft)); 612 memcpy(&x1->lft, &x->lft, sizeof(x1->lft));
607 x1->km.dying = 0; 613 x1->km.dying = 0;
608 614