kernel-pfkey: Fix extended replay configuration on FreeBSD 11.1
authorTobias Brunner <tobias@strongswan.org>
Mon, 4 Dec 2017 09:01:14 +0000 (10:01 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 22 Dec 2017 09:19:49 +0000 (10:19 +0100)
Fixes: 88a8fba1c76e ("kernel-pfkey: Support anti-replay windows > 2k")
Fixes #2501.

src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c

index 7101078..79abe58 100644 (file)
@@ -1752,13 +1752,13 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
 #ifdef SADB_X_EXT_SA_REPLAY
        if (data->inbound)
        {
-               struct sadb_x_sa_replay *replay;
+               struct sadb_x_sa_replay *repl;
 
-               replay = (struct sadb_x_sa_replay*)PFKEY_EXT_ADD_NEXT(msg);
-               replay->sadb_x_replay_exttype = SADB_X_EXT_SA_REPLAY;
-               replay->sadb_x_replay_len = PFKEY_LEN(sizeof(struct sadb_x_sa_replay));
-               replay->sadb_x_replay_replay = min(data->replay_window, UINT32_MAX-32);
-               PFKEY_EXT_ADD(msg, replay);
+               repl = (struct sadb_x_sa_replay*)PFKEY_EXT_ADD_NEXT(msg);
+               repl->sadb_x_sa_replay_exttype = SADB_X_EXT_SA_REPLAY;
+               repl->sadb_x_sa_replay_len = PFKEY_LEN(sizeof(struct sadb_x_sa_replay));
+               repl->sadb_x_sa_replay_replay = min(data->replay_window, UINT32_MAX-32);
+               PFKEY_EXT_ADD(msg, repl);
        }
 #endif