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.
Showing the changes to include/uapi (1 of 7 files). Show all
Unified · Split
| @@ -141,6 +141,11 @@ enum { · 140 unmodified lines | |||
| 141 | XFRM_POLICY_MAX = 3 | 141 | XFRM_POLICY_MAX = 3 |
| 142 | }; | 142 | }; |
| 143 | 143 | ||
| 144 | enum xfrm_sa_dir { | ||
| 145 | XFRM_SA_DIR_IN = 1, | ||
| 146 | XFRM_SA_DIR_OUT = 2 | ||
| 147 | }; | ||
| 148 | |||
| 144 | enum { | 149 | enum { |
| 145 | XFRM_SHARE_ANY, /* No limitations */ | 150 | XFRM_SHARE_ANY, /* No limitations */ |
| 146 | XFRM_SHARE_SESSION, /* For this session only */ | 151 | XFRM_SHARE_SESSION, /* For this session only */ |
| @@ -315,6 +320,7 @@ enum xfrm_attr_type_t { · 168 unmodified lines | |||
| 315 | XFRMA_SET_MARK_MASK, /* __u32 */ | 320 | XFRMA_SET_MARK_MASK, /* __u32 */ |
| 316 | XFRMA_IF_ID, /* __u32 */ | 321 | XFRMA_IF_ID, /* __u32 */ |
| 317 | XFRMA_MTIMER_THRESH, /* __u32 in seconds for input SA */ | 322 | XFRMA_MTIMER_THRESH, /* __u32 in seconds for input SA */ |
| 323 | XFRMA_SA_DIR, /* __u8 */ | ||
| 318 | __XFRMA_MAX | 324 | __XFRMA_MAX |
| 319 | 325 | ||
| 320 | #define XFRMA_OUTPUT_MARK XFRMA_SET_MARK /* Compatibility */ | 326 | #define XFRMA_OUTPUT_MARK XFRMA_SET_MARK /* Compatibility */ |