]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: allow to avoid copying DSCP during encapsulation
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Fri, 22 Feb 2013 09:54:54 +0000 (10:54 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 6 Mar 2013 06:02:45 +0000 (07:02 +0100)
commitea6d53e28c32860e1d3fa7507a53924cdde31df8
treeca5ccc41834e4c811e859724a184f223a3772ca7
parentf014b5c81aaf469330c87542b8c934afad87e46b
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>
include/net/xfrm.h
include/uapi/linux/xfrm.h
net/ipv4/ipcomp.c
net/ipv4/xfrm4_mode_tunnel.c
net/ipv6/xfrm6_mode_tunnel.c
net/xfrm/xfrm_state.c
net/xfrm/xfrm_user.c