Bug 1105180
| Summary: | ipsec_auto --ready doesn't work properly | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Aleš Mareček <amarecek> |
| Component: | libreswan | Assignee: | Paul Wouters <pwouters> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | BaseOS QE Security Team <qe-baseos-security> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.0 | CC: | jaster |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1105179 | Environment: | |
| Last Closed: | 2014-10-24 04:30:59 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1105179 | ||
| Bug Blocks: | |||
|
Description
Aleš Mareček
2014-06-05 14:03:35 UTC
ipsec auto --ready does not take a connection name. This is a bug in the man page that states:
ipsec auto { --status | --ready } connection
(ipsec auto --status also does not take a connection name)
It does state so later in the man page:
The --ready, --rereadsecrets, --rereadgroups, and --statusoperations do not take a connection name.
The displayed usage message is correct in this respect:
ipsec auto [--showonly] --{ready|status|rereadsecrets|rereadgroups}
The startup of the IKE daemon does allow for that initial gap within the first 1-3 seconds. The pluto daemon starts. It performs setup and when it is ready to be configured it will launch "ipsec addconn --autoall" in a thread. Immediately after launching the thread, it will listen on the socket (eg issue an internal 'ipsec auto --ready' which is really 'ipsec whack --listen').
What your scripts do is to immediately try to --up a connection that the thread has not yet run --add on.
While we could add a pauze to wait for loading the connections, this causes an unwanted delay when people have thousands of connections loading. There is no reason to wait for the first connections that are loaded to not be available while other connections load.
The proper way to start a connection on boot is not your script, but to use auto=start (for connections you want to ipsec auto --up on boot) or auto=route (for connections you want to ipsec auto --route on boot)
I've just commited the fixes to the man page of auto. These will be in libreswan-3.9 (which will be rebased into RHEL 7.1)
This was already pushed into rhel 7 via 3.9 |