ike: Treat action_t as flags so 'start' and 'trap' can be combined
While combining the actions could cause duplicates (while the SA is initiated, traffic might trigger the trap and the initiation of another CHILD_SA), the previous commit should avoid most duplicates. If reuse_ikesa is disabled, duplicates can't be prevented, though.
This commit is contained in:
@@ -22,10 +22,10 @@
|
||||
|
||||
#include <daemon.h>
|
||||
|
||||
ENUM(action_names, ACTION_NONE, ACTION_RESTART,
|
||||
"clear",
|
||||
"hold",
|
||||
"restart",
|
||||
ENUM_FLAGS(action_names, ACTION_TRAP, ACTION_START,
|
||||
"none",
|
||||
"trap",
|
||||
"start",
|
||||
);
|
||||
|
||||
/** Default replay window size, if not set using charon.replay_window */
|
||||
|
||||
@@ -40,11 +40,11 @@ typedef struct child_cfg_create_t child_cfg_create_t;
|
||||
*/
|
||||
enum action_t {
|
||||
/** No action */
|
||||
ACTION_NONE,
|
||||
/** Route config to establish or reestablish on demand */
|
||||
ACTION_ROUTE,
|
||||
/** Start or restart config immediately */
|
||||
ACTION_RESTART,
|
||||
ACTION_NONE = 0,
|
||||
/** Install trap policy to (re-)establish on demand */
|
||||
ACTION_TRAP = (1<<0),
|
||||
/** Start or restart immediately */
|
||||
ACTION_START = (1<<1),
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user