ipsec: Interfamily IPSec BEET, ipv4-inner ipv6-outer
Here's a revised version, based on Herbert's comments, of a fix for the ipv4-inner, ipv6-outer interfamily ipsec beet mode. It fixes the network header adjustment during interfamily, as well as makes sure that we reserve enough room for the new ipv6 header if we might have something else as the inner family. Also, the ipv4 pseudo header construction was added. Signed-off-by: Joakim Koskela <jookos@gmail.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
eb49e63093
commit
abf5cdb89d
@@ -521,6 +521,10 @@ static int esp6_init_state(struct xfrm_state *x)
|
||||
crypto_aead_ivsize(aead);
|
||||
switch (x->props.mode) {
|
||||
case XFRM_MODE_BEET:
|
||||
if (x->sel.family != AF_INET6)
|
||||
x->props.header_len += IPV4_BEET_PHMAXLEN +
|
||||
(sizeof(struct ipv6hdr) - sizeof(struct iphdr));
|
||||
break;
|
||||
case XFRM_MODE_TRANSPORT:
|
||||
break;
|
||||
case XFRM_MODE_TUNNEL:
|
||||
|
Reference in New Issue
Block a user