| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The change in c423d0e8a124 ("testing: Fix race in tnc/tnccs-20-pdp-pt-tls
scenario") is not really ideal as now the vici plugin might not yet be
ready when `swanctl --load-creds` is called. Perhaps starting charon
before Apache causes enough delay.
Once we switch to charon-systemd this isn't a problem anymore as starting the
unit will block until everything is up and ready. Also, the individual
swanctl calls will be redundant as the default service unit calls --load-all.
But start scripts do run before charon-systemd signals that the daemon is
ready, so using these would work too then.
|
|
|
|
|
|
|
|
|
| |
The main issue is that the ldap and curl plugins, or rather the libraries
they use, initialize GnuTLS (curl, strangely, even when it is, by its own
account, linked against OpenSSL). Some of these allocations are only freed
once the libraries are unloaded. This means that the leak detective causes
invalid frees when swanctl is terminated and libraries are unloaded after the
leak detective is already deinitialized.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Improves the handling of IKEv2 exchange collisions in several corner
cases. TEMPORARY_FAILURE and CHILD_SA_NOT_FOUND notifies that were defined
with RFC 7296 are now handled and sent as appropriate.
The behavior in these situations is tested with new unit tests.
Fixes #379, #464, #876, #1293.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Depending on the lifetimes a CHILD_SA we rekeyed as responder might
expire shortly afterwards. We don't want to rekey it again.
When retrying due to an INVALID_KE_PAYLOAD notify the expected state
is CHILD_REKEYING if it is anything else (e.g. due to a collision) we
ignore it.
We also abort the exchange properly if we don't find the CHILD_SA, no
need for an empty INFORMATIONAL exchange anymore.
|
| | |
|
| |
| |
| |
| | |
INVALID_KE_PAYLOAD is delayed
|
| |
| |
| |
| |
| |
| |
| | |
If a passive rekeying fails due to an INVALID_KE_PAYLOAD we don't want
to consider this task later when resolving collisions. This previously
might have caused the wrong SA to get deleted/installed based on the nonces
in the unsuccessful exchange.
|
| | |
|
| |
| |
| |
| | |
We queue a delayed task that is initiated after a while.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Such a task is not initiated unless a certain time has passed. This
allows delaying certain tasks but avoids problems if we'd do this
via a scheduled job (e.g. if the IKE_SA is rekeyed in the meantime).
If the IKE_SA is rekeyed the delay of such tasks is reset when the
tasks are adopted i.e. they get executed immediately on the new IKE_SA.
This hasn't been implemented for IKEv1 yet.
|
| |
| |
| |
| | |
Retry exchanges between 5 and 15 seconds after a temporary failure.
|
| | |
|
| |
| |
| |
| | |
received
|
| |
| |
| |
| | |
over local ones
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
subtask failed
For instance, if INVALID_KE_PAYLOAD is returned we don't want this task
to affect any active rekeying (no new SA has been established so far).
|
| |
| |
| |
| | |
delayed
|
| |
| |
| |
| | |
one peer
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the peer does not detect the rekey collision and deletes the old
IKE_SA and then receives the colliding rekey request it will respond with
TEMPORARY_FAILURE. That notify may arrive before the DELETE does, in
which case we may just conclude the rekeying initiated by the peer.
Also, since the IKE_SA is destroyed in any case when we receive a delete
there is no point in storing the delete task in collide() as process_i()
in the ike-rekey task will never be called.
|
| | |
|
| |
| |
| |
| |
| | |
This simplifies collision handling and we don't need to know about these
tasks when concluding the rekeying we initiated.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
collision
We conclude the rekeying before deleting the IKE_SA. Waiting for the
potential TEMPORARY_FAILURE notify is no good because if that response
does not reach us the peer will not retransmit it upon our retransmits
of the rekey request if it already deleted the IKE_SA after receiving
our response to the delete.
|
| |
| |
| |
| |
| | |
We treat these as if we concluded the rekeying, the active ike-rekey task
will handle the collision afterwards.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
As per RFC 7296, 2.25.2 (what we did before was the behavior described
in RFC 4718).
|
| | |
|
| | |
|
| |
| |
| |
| | |
rekeyed/deleted/established
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
RFC 7296 explicitly says we SHOULD reply as usual and forget about our
own close request.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|