| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes handling such IKE_SAs more specifically compared to keeping them
in state IKE_CONNECTING or IKE_ESTABLISHED (which we did when we lost a
collision - even triggering the ike_updown event), or using IKE_REKEYING for
them, which would also be ambiguous.
For instance, we can now reject anything but DELETES for such SAs.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As the static plugin that creates and destroys the default sender was
not initialized because of the missing socket the daemon won't destroy
our sender. Test cases will eventually have to flush the IKE_SA manager to
satisfy the leak detective. However, in case of a test failure and if there
are IKE_SAs in the manager the daemon will flush the SAs when deinitializing,
which will cause deletes to get sent. This crashes if the sender is already
destroyed.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
during cleanup
In case listeners on the stack are triggered while cleaning up after a
test failed (e.g. via ike_sa_manager_t::flush) remaining listeners defined on
the stack would cause a segmentation fault.
|
| |
| |
| |
| | |
This allows calling flush() multiple times.
|
| |
| |
| |
| |
| |
| | |
Moving to the new SA only after receiving the DELETE for the old SA was
not ideal as it rendered the new SA unusable (because it simply didn't
exist in the manager) if the DELETE was delayed/got dropped.
|
| | |
|
| |
| |
| |
| |
| |
| | |
This happens if the peer deletes the redundant SA before we are able to
handle the response. The deleted SA will be in state CHILD_INSTALLED but
we don't want to trigger the child_updown() event for it or recreate it.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This happens if there is a rekey collision and the peers disagree on the
DH group.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
This allows handling collisions better, in particular with deletions.
|
| | |
|
| |
| |
| |
| |
| |
| | |
getting deleted
These are the notifies we should return according to RFC 7296.
|
| | |
|
| |
| |
| |
| |
| | |
We will later add code to retry creating the CHILD_SA if we are not
rekeying. Rekeying is already rescheduled as with any other errors.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Since we use unique sequential SPIs that should be OK.
|
| | |
|
| |
| |
| |
| | |
Fixes: e2fc09c186c3 ("Add nonce generator interface")
|
| |
| |
| |
| |
| | |
We don't make the full nonces configurable but only the first byte,
which should be enough to force a nonce to be smaller than others.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
If the openssl plugin is built DH isn't that much of an overhead as
ecp256 is used, but the default MODP group is now modp3072.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Generally, we will not find the CHILD_SA by searching for it with the
outbound SPI (the initiator of the DELETE sent its inbound SPI) - and if
we found a CHILD_SA it would most likely be the wrong one (one in which
we used the same inbound SPI as the peer used for the one it deletes).
And we don't actually want to destroy the CHILD_SA at this point as we
know we already initiated a DELETE ourselves, which means that task
still has a reference to it and will destroy the CHILD_SA when it
receives the response from the other peer.
|
| | |
|
| | |
|
| |
| |
| |
| | |
This allows proper initialization of the daemon and the helper object.
|
| | |
|
| |
| |
| |
| | |
Provides predictable sequential SPIs.
|
| |
| |
| |
| |
| | |
This allows to retrieve packets sent by an IKE_SA and pass it to another
IKE_SA directly via process_message().
|
| | |
|
|/
|
|
|
|
|
| |
libcharon_deinit() already calls all the functions we called manually.
Unloading the plugins will not work if charon->initialize() is called
as charon's static plugin features would already be unloaded before the
destroyed members are accessed in destroy() to flush them.
|
|
|
|
|
| |
It's not necessary and might waste memory. However, if ESN is used we set
the window to 1 as the kernel rejects the attribute otherwise.
|
|
|
|
|
| |
It is not necessary for outbound SAs and might waste memory when large
window sizes are used.
|
|
|
|
|
|
|
|
|
|
| |
aacf84d837e7 ("testing: Add expect-connection calls for all tests and
hosts") removed the expect-connection call for the non-existing aaa
connection. However, because the credentials were loaded asynchronously
via start-script the clients might have been connecting when the secrets
were not yet loaded. As `swanctl --load-creds` is a synchronous call
this change avoids that issue without having to add a sleep or failing
expect-connection call.
|
|
|
|
|
|
|
| |
If a called script interacts with the daemon or one of its plugins
another thread might have to acquire the write lock (e.g. to configure a
fallback or set a value). Holding the read lock prevents that, potentially
resulting in a deadlock.
|
|
|
|
|
|
|
|
|
| |
This took a while as in the OpenSSL package shipped with Debian and on which
our FIPS-enabled package is based, the function SSL_export_keying_material(),
which is used by FreeRADIUS to derive the MSK, did not use the correct digest
to calculate the result when TLS 1.2 was used. This caused IKE to fail with
"verification of AUTH payload with EAP MSK failed". The fix was only
backported to jessie recently.
|