From b006174e2b45e66c6edb64160f686ab4ceb413a0 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 19 Nov 2026 14:49:06 +0000 Subject: [PATCH] strongswan: add esp_proposal to the simple configuration mode Add the list option esp_proposal to a connection in the simple configuration mode and write it as esp_proposals of its child. The crypto_proposal option of the connection already holds the IKE proposals. Signed-off-by: Florian Eckert --- net/strongswan/files/swanctl.init | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/strongswan/files/swanctl.init b/net/strongswan/files/swanctl.init index 4db42b1aa1..24c34cbfeb 100644 --- a/net/strongswan/files/swanctl.init +++ b/net/strongswan/files/swanctl.init @@ -1006,12 +1006,16 @@ config_connection_simple_child() { local remote_ts local start_action local if_id + local crypto="" config_list_foreach "$conf" local_ts append_var local_ts "," config_list_foreach "$conf" remote_ts append_var remote_ts "," config_get start_action "$conf" start_action "none" config_get if_id "$conf" if_id "" + # The crypto_proposal option of a connection holds the IKE proposals. + config_list_foreach "$conf" esp_proposal config_esp_proposal + case "$start_action" in none|trap|start) ;; @@ -1028,6 +1032,7 @@ config_connection_simple_child() { swanctl_xappend4 "if_id_in = $if_id" "if_id_out = $if_id" [ -n "$start_action" ] && [ "$start_action" != "none" ] && \ swanctl_xappend4 "start_action = $start_action" + [ -n "$crypto" ] && swanctl_xappend4 "esp_proposals = $crypto" swanctl_xappend4 "mode = tunnel" swanctl_xappend3 "}" }