Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1386666

Summary: keyingtries=0 is broken - meaning it is interpreted as keyingtries=1
Product: Red Hat Enterprise Linux 7 Reporter: Marcel Kolaja <mkolaja>
Component: libreswanAssignee: Paul Wouters <pwouters>
Status: CLOSED ERRATA QA Contact: Ondrej Moriš <omoris>
Severity: medium Docs Contact: Mirek Jahoda <mjahoda>
Priority: high    
Version: 7.2CC: jaster, ksrot, mjahoda, mkolaja, omoris, pvrabec, pwouters, tmraz
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
In Libreswan 3.13, 3.14, and 3.15, the "keyingtries=0" option for the "ipsec whack" command did not work properly. Consequently, the pluto IKE daemon stopped trying to establish the tunnels that were not immediately established if "keyingtries=0" was used. With this update, pluto tries to establish the tunnel with "keyingtries=0" indefinitely.
Story Points: ---
Clone Of: 1283468 Environment:
Last Closed: 2016-11-09 17:16:29 UTC Type: ---
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: 1283468    
Bug Blocks:    

Description Marcel Kolaja 2016-10-19 12:15:22 UTC
This bug has been copied from bug #1283468 and has been proposed
to be backported to 7.2 z-stream (EUS).

Comment 4 Ondrej Moriš 2016-10-27 12:14:52 UTC
Successfully verified with libreswan-3.15-6.3.el7_2.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: SERVER - keyingtries=0 (forever)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Command 'sed -i 's/keyingtries=.*/keyingtries=0/' /etc/ipsec.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'service ipsec start && sleep 5' (Expected 0, got 0)
:: [   LOG    ] :: sync: SERVER is waiting for flag CLIENT_READY_TEST03
:: [   LOG    ] :: sync: SERVER got flag CLIENT_READY_TEST03
:: [   PASS   ] :: Command 'syncExp CLIENT_READY_TEST03' (Expected 0, got 0)
:: [   LOG    ] :: sync: SERVER set flag SERVER_READY_TEST03
:: [   PASS   ] :: Command 'syncSet SERVER_READY_TEST03' (Expected 0, got 0)
:: [   LOG    ] :: sync: SERVER is waiting for flag CLIENT_DONE_TEST03
:: [   LOG    ] :: sync: SERVER got flag CLIENT_DONE_TEST03
:: [   PASS   ] :: Command 'syncExp CLIENT_DONE_TEST03' (Expected 0, got 0)
:: [   LOG    ] :: sync: SERVER set flag SERVER_DONE_TEST03
:: [   PASS   ] :: Command 'syncSet SERVER_DONE_TEST03' (Expected 0, got 0)
:: [   PASS   ] :: Command 'service ipsec stop && sleep 5' (Expected 0, got 0)
:: [   LOG    ] :: Duration: 8m 45s
:: [   LOG    ] :: Assertions: 7 good, 0 bad
:: [   PASS   ] :: RESULT: SERVER - keyingtries=0 (forever)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: CLIENT - keyingtries=0 (forever)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Command 'sed -i 's/keyingtries=.*/keyingtries=0/' /etc/ipsec.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'service ipsec start && sleep 5' (Expected 0, got 0)
:: [   LOG    ] :: sync: CLIENT set flag CLIENT_READY_TEST03
:: [   PASS   ] :: Command 'syncSet CLIENT_READY_TEST03' (Expected 0, got 0)
:: [   LOG    ] :: sync: CLIENT is waiting for flag SERVER_READY_TEST03
:: [   LOG    ] :: sync: CLIENT got flag SERVER_READY_TEST03
:: [   PASS   ] :: Command 'syncExp SERVER_READY_TEST03' (Expected 0, got 0)
:: [   PASS   ] :: Command 'ipsec auto --up test' (Expected 0, got 0)
:: [   PASS   ] :: Command 'service ipsec status' (Expected 0, got 0)
:: [   PASS   ] :: Command 'ip xfrm state' (Expected 0, got 0)
:: [   PASS   ] :: Command 'ip xfrm policy' (Expected 0, got 0)
:: [   LOG    ] :: Found keying attempt 2
:: [   LOG    ] :: Found keying attempt 3
:: [   LOG    ] :: Found keying attempt 4
:: [   LOG    ] :: Found keying attempt 5
:: [   LOG    ] :: Found keying attempt 6
:: [   LOG    ] :: Breaking unlimited number of keying attempts after 6 attempts
:: [   LOG    ] :: Timeout exceeded!
:: [   PASS   ] :: Command 'break_and_renew 0 test 300' (Expected 0, got 0)
:: [   PASS   ] :: Command 'service ipsec status' (Expected 0, got 0)
:: [   PASS   ] :: Command 'ip xfrm state' (Expected 0, got 0)
:: [   PASS   ] :: Command 'ip xfrm policy' (Expected 0, got 0)
:: [   LOG    ] :: sync: CLIENT set flag CLIENT_DONE_TEST03
:: [   PASS   ] :: Command 'syncSet CLIENT_DONE_TEST03' (Expected 0, got 0)
:: [   LOG    ] :: sync: CLIENT is waiting for flag SERVER_DONE_TEST03
:: [   LOG    ] :: sync: CLIENT got flag SERVER_DONE_TEST03
:: [   PASS   ] :: Command 'syncExp SERVER_DONE_TEST03' (Expected 0, got 0)
:: [   PASS   ] :: Command 'service ipsec stop && sleep 5' (Expected 0, got 0)
:: [   LOG    ] :: Duration: 8m 40s
:: [   LOG    ] :: Assertions: 15 good, 0 bad
:: [   PASS   ] :: RESULT: CLIENT - keyingtries=0 (forever)

For more details, see [1].

[1] https://tcms.engineering.redhat.com/run/296233/?case__tag__name=#caserun_13966224

Comment 6 errata-xmlrpc 2016-11-09 17:16:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2683.html