summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/xfrm.h
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2018-06-12 12:44:26 +0200
committerSteffen Klassert <steffen.klassert@secunet.com>2018-06-23 16:06:57 +0200
commit9b42c1f179a614e11893ae4619f0304a38f481ae (patch)
tree000229dd4cc78f2dc45c5a97b8f8ec72a18ee0e9 /include/uapi/linux/xfrm.h
parentdd55c4ea9e6ba957083f985f33f994c23b405e9e (diff)
downloadlinux-9b42c1f179a614e11893ae4619f0304a38f481ae.tar.gz
linux-9b42c1f179a614e11893ae4619f0304a38f481ae.tar.bz2
linux-9b42c1f179a614e11893ae4619f0304a38f481ae.zip
xfrm: Extend the output_mark to support input direction and masking.
We already support setting an output mark at the xfrm_state, unfortunately this does not support the input direction and masking the marks that will be applied to the skb. This change adds support applying a masked value in both directions. The existing XFRMA_OUTPUT_MARK number is reused for this purpose and as it is now bi-directional, it is renamed to XFRMA_SET_MARK. An additional XFRMA_SET_MARK_MASK attribute is added for setting the mask. If the attribute mask not provided, it is set to 0xffffffff, keeping the XFRMA_OUTPUT_MARK existing 'full mask' semantics. Co-developed-by: Tobias Brunner <tobias@strongswan.org> Co-developed-by: Eyal Birger <eyal.birger@gmail.com> Co-developed-by: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Tobias Brunner <tobias@strongswan.org> Signed-off-by: Eyal Birger <eyal.birger@gmail.com> Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Diffstat (limited to 'include/uapi/linux/xfrm.h')
-rw-r--r--include/uapi/linux/xfrm.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/uapi/linux/xfrm.h b/include/uapi/linux/xfrm.h
index e3af2859188b..5a6ed7ce5a29 100644
--- a/include/uapi/linux/xfrm.h
+++ b/include/uapi/linux/xfrm.h
@@ -305,9 +305,11 @@ enum xfrm_attr_type_t {
XFRMA_ADDRESS_FILTER, /* struct xfrm_address_filter */
XFRMA_PAD,
XFRMA_OFFLOAD_DEV, /* struct xfrm_state_offload */
- XFRMA_OUTPUT_MARK, /* __u32 */
+ XFRMA_SET_MARK, /* __u32 */
+ XFRMA_SET_MARK_MASK, /* __u32 */
__XFRMA_MAX
+#define XFRMA_OUTPUT_MARK XFRMA_SET_MARK /* Compatibility */
#define XFRMA_MAX (__XFRMA_MAX - 1)
};