aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2013-02-22 04:54:54 -0500
committerSteffen Klassert <steffen.klassert@secunet.com>2013-03-06 01:02:45 -0500
commita947b0a93efa9a25c012aa88848f4cf8d9b41280 (patch)
treeca5ccc41834e4c811e859724a184f223a3772ca7 /include/uapi
parent6fac41157252220678b210fcb13e2c3dad7a912a (diff)
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 'include/uapi')
-rw-r--r--include/uapi/linux/xfrm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/xfrm.h b/include/uapi/linux/xfrm.h
index 28e493b5b94c..a8cd6a4a2970 100644
--- a/include/uapi/linux/xfrm.h
+++ b/include/uapi/linux/xfrm.h
@@ -297,6 +297,7 @@ enum xfrm_attr_type_t {
297 XFRMA_MARK, /* struct xfrm_mark */ 297 XFRMA_MARK, /* struct xfrm_mark */
298 XFRMA_TFCPAD, /* __u32 */ 298 XFRMA_TFCPAD, /* __u32 */
299 XFRMA_REPLAY_ESN_VAL, /* struct xfrm_replay_esn */ 299 XFRMA_REPLAY_ESN_VAL, /* struct xfrm_replay_esn */
300 XFRMA_SA_EXTRA_FLAGS, /* __u32 */
300 __XFRMA_MAX 301 __XFRMA_MAX
301 302
302#define XFRMA_MAX (__XFRMA_MAX - 1) 303#define XFRMA_MAX (__XFRMA_MAX - 1)
@@ -367,6 +368,8 @@ struct xfrm_usersa_info {
367#define XFRM_STATE_ESN 128 368#define XFRM_STATE_ESN 128
368}; 369};
369 370
371#define XFRM_SA_XFLAG_DONT_ENCAP_DSCP 1
372
370struct xfrm_usersa_id { 373struct xfrm_usersa_id {
371 xfrm_address_t daddr; 374 xfrm_address_t daddr;
372 __be32 spi; 375 __be32 spi;