Issue #3141
swanctl sometimes fails to show child DH group
Description
I couldn't find a precise way to reproduce but I noted DH group is not printed by swanctl -l every time. Here is an output where it shows up on some SAs and not anothers:
ipsec1: #4, ESTABLISHED, IKEv2, 13752379312518493559_i 6884148597491292803_r* local 'x.x.x.x' @ x.x.x.x[500] remote 'x.x.x.x' @ x.x.x.x[500] AES_CBC-128/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_2048 established 2709s ago, rekeying in 21722s child0: #4, reqid 1, INSTALLED, TUNNEL, ESP:AES_CBC-128/HMAC_SHA1_96 <-- Here it's missing installed 2709s ago, rekeying in 322s, expires in 891s in 3556290940 (0x00000002), 10000 bytes, 144 packets, 2632s ago out 3255026732 (0x00000002), 4015 bytes, 141 packets, 2632s ago local 0.0.0.0/0 remote 0.0.0.0/0 ipsec1: #2, ESTABLISHED, IKEv2, 5818716016802818031_i* 5102792958455189462_r local 'x.x.x.x' @ x.x.x.x[500] remote 'x.x.x.x' @ x.x.x.x[500] AES_CBC-128/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_2048 established 2716s ago, rekeying in 22745s, reauth in 22612s child0: #5, reqid 1, INSTALLED, TUNNEL, ESP:AES_CBC-128/HMAC_SHA1_96/MODP_2048 <-- Here it's OK installed 2638s ago, rekeying in 433s, expires in 962s in 3897519380 (0x00000002), 343108 bytes, 4981 packets, 183s ago out 3350772002 (0x00000002), 143152 bytes, 4981 packets, 183s ago local 0.0.0.0/0 remote 0.0.0.0/0 child0: #7, reqid 1, INSTALLED, TUNNEL, ESP:AES_CBC-128/HMAC_SHA1_96/MODP_2048 <-- Here it's OK installed 184s ago, rekeying in 2745s, expires in 3416s in 346435594 (0x00000002), 25604 bytes, 373 packets, 1s ago out 3382577391 (0x00000002), 10673 bytes, 374 packets, 0s ago local 0.0.0.0/0 remote 0.0.0.0/0
History
#1 Updated by Andreas Steffen about 6 years ago
- Status changed from New to Feedback
- Assignee set to Andreas Steffen
The session keys of the first CHILD SA are always directly derived from the Diffie-Hellman secret of the parent IKE SA. This is why the DH Group is not shown in the swanctl output.
During CHILD_SA rekeying a fresh Diffie-Hellman exchange is executed from which the session keys of the new CHILD SA are derived. Therefore the DH Group used to do the rekeying is shown in the swanctl output.
#2 Updated by Andreas Steffen about 6 years ago
- Tracker changed from Bug to Issue
- Start date deleted (
09.08.2019)
#3 Updated by Tobias Brunner about 6 years ago
- Status changed from Feedback to Closed
- Resolution set to No change required
More information about this can be found on ExpiryRekey and since 5.8.0 childless initiation may be used to create all CHILD_SA with CREATE_CHILD_SA exchanges and derive keys for them with separate DH exchanges.