aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_state.c
diff options
context:
space:
mode:
authorNoriaki TAKAMIYA <takamiya@po.ntts.co.jp>2006-08-23 21:18:55 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 18:06:42 -0400
commit060f02a3bdd4d9ba8aa3c48e9b470672b1f3a585 (patch)
tree0eb60cf50ad70ceb856c82c32124470f6bce2d86 /net/xfrm/xfrm_state.c
parent1b5c229987dc4d0c92a38fac0cde2aeec08cd775 (diff)
[XFRM] STATE: Introduce care-of address.
Care-of address is carried by state as a transformation option like IPsec encryption/authentication algorithm. Based on MIPL2 kernel patch. Signed-off-by: Noriaki TAKAMIYA <takamiya@po.ntts.co.jp> Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
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