diff options
author | Antony Antony <antony.antony@secunet.com> | 2024-04-30 09:08:52 +0200 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2024-05-01 10:05:11 +0200 |
commit | a4a87fa4e96c7746e009de06a567688fd9af6013 (patch) | |
tree | 6d37f9d613320a65c2c79166d7611a28632eff21 /include/uapi/linux/xfrm.h | |
parent | aeb48a428d7dbe636203ae892e981bcc3e2ac042 (diff) | |
download | lwn-a4a87fa4e96c7746e009de06a567688fd9af6013.tar.gz lwn-a4a87fa4e96c7746e009de06a567688fd9af6013.zip |
xfrm: Add Direction to the SA in or out
This patch introduces the 'dir' attribute, 'in' or 'out', to the
xfrm_state, SA, enhancing usability by delineating the scope of values
based on direction. An input SA will restrict values pertinent to input,
effectively segregating them from output-related values.
And an output SA will restrict attributes for output. This change aims
to streamline the configuration process and improve the overall
consistency of SA attributes during configuration.
This feature sets the groundwork for future patches, including
the upcoming IP-TFS patch.
Signed-off-by: Antony Antony <antony.antony@secunet.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'include/uapi/linux/xfrm.h')
-rw-r--r-- | include/uapi/linux/xfrm.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/xfrm.h b/include/uapi/linux/xfrm.h index 6a77328be114..18ceaba8486e 100644 --- a/include/uapi/linux/xfrm.h +++ b/include/uapi/linux/xfrm.h @@ -141,6 +141,11 @@ enum { XFRM_POLICY_MAX = 3 }; +enum xfrm_sa_dir { + XFRM_SA_DIR_IN = 1, + XFRM_SA_DIR_OUT = 2 +}; + enum { XFRM_SHARE_ANY, /* No limitations */ XFRM_SHARE_SESSION, /* For this session only */ @@ -315,6 +320,7 @@ enum xfrm_attr_type_t { XFRMA_SET_MARK_MASK, /* __u32 */ XFRMA_IF_ID, /* __u32 */ XFRMA_MTIMER_THRESH, /* __u32 in seconds for input SA */ + XFRMA_SA_DIR, /* __u8 */ __XFRMA_MAX #define XFRMA_OUTPUT_MARK XFRMA_SET_MARK /* Compatibility */ |