diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2013-02-22 10:54:54 +0100 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2013-03-06 07:02:45 +0100 |
commit | a947b0a93efa9a25c012aa88848f4cf8d9b41280 (patch) | |
tree | ca5ccc41834e4c811e859724a184f223a3772ca7 /net/ipv4/ipcomp.c | |
parent | 6fac41157252220678b210fcb13e2c3dad7a912a (diff) | |
download | linux-stable-a947b0a93efa9a25c012aa88848f4cf8d9b41280.tar.gz linux-stable-a947b0a93efa9a25c012aa88848f4cf8d9b41280.tar.bz2 linux-stable-a947b0a93efa9a25c012aa88848f4cf8d9b41280.zip |
xfrm: allow to avoid copying DSCP during encapsulation
By default, DSCP is copying during encapsulation.
Copying the DSCP in IPsec tunneling may be a bit dangerous because packets with
different DSCP may get reordered relative to each other in the network and then
dropped by the remote IPsec GW if the reordering becomes too big compared to the
replay window.
It is possible to avoid this copy with netfilter rules, but it's very convenient
to be able to configure it for each SA directly.
This patch adds a toogle for this purpose. By default, it's not set to maintain
backward compatibility.
Field flags in struct xfrm_usersa_info is full, hence I add a new attribute.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/ipv4/ipcomp.c')
-rw-r--r-- | net/ipv4/ipcomp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c index f01d1b1aff7f..59cb8c769056 100644 --- a/net/ipv4/ipcomp.c +++ b/net/ipv4/ipcomp.c @@ -75,6 +75,7 @@ static struct xfrm_state *ipcomp_tunnel_create(struct xfrm_state *x) t->props.mode = x->props.mode; t->props.saddr.a4 = x->props.saddr.a4; t->props.flags = x->props.flags; + t->props.extra_flags = x->props.extra_flags; memcpy(&t->mark, &x->mark, sizeof(t->mark)); if (xfrm_init_state(t)) |