child-sa: Replace reqid based marks by "unique" marks
As we now use the same reqid for multiple CHILD_SAs with the same selectors, having marks based on the reqid makes not that much sense anymore. Instead we use unique marks that use a custom identifier. This identifier is reused during rekeying, keeping the marks constant for any rule relying on it (for example installed by updown). This also simplifies handling of reqid allocation, as we do not have to query the marks that is not yet assigned for an unknown reqid.
This commit is contained in:
@@ -44,6 +44,14 @@ struct quick_mode_t {
|
||||
*/
|
||||
void (*use_reqid)(quick_mode_t *this, u_int32_t reqid);
|
||||
|
||||
/**
|
||||
* Use specific mark values, overriding configuration.
|
||||
*
|
||||
* @param in inbound mark value
|
||||
* @param out outbound mark value
|
||||
*/
|
||||
void (*use_marks)(quick_mode_t *this, u_int in, u_int out);
|
||||
|
||||
/**
|
||||
* Set the SPI of the old SA, if rekeying.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user