[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>
This commit is contained in:
committed by
David S. Miller
parent
1b5c229987
commit
060f02a3bd
@@ -78,6 +78,7 @@ static void xfrm_state_gc_destroy(struct xfrm_state *x)
|
||||
kfree(x->ealg);
|
||||
kfree(x->calg);
|
||||
kfree(x->encap);
|
||||
kfree(x->coaddr);
|
||||
if (x->mode)
|
||||
xfrm_put_mode(x->mode);
|
||||
if (x->type) {
|
||||
@@ -603,6 +604,11 @@ out:
|
||||
if (likely(x1->km.state == XFRM_STATE_VALID)) {
|
||||
if (x->encap && x1->encap)
|
||||
memcpy(x1->encap, x->encap, sizeof(*x1->encap));
|
||||
if (x->coaddr && x1->coaddr) {
|
||||
memcpy(x1->coaddr, x->coaddr, sizeof(*x1->coaddr));
|
||||
}
|
||||
if (!use_spi && memcmp(&x1->sel, &x->sel, sizeof(x1->sel)))
|
||||
memcpy(&x1->sel, &x->sel, sizeof(x1->sel));
|
||||
memcpy(&x1->lft, &x->lft, sizeof(x1->lft));
|
||||
x1->km.dying = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user