Skip to content

Commit

Permalink
Fixed issue where yast2-vpn breaks with strongswan
Browse files Browse the repository at this point in the history
  • Loading branch information
m5aquib committed Apr 5, 2023
1 parent 8b68036 commit 7798e8c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
7 changes: 7 additions & 0 deletions package/yast2-vpn.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Apr 5 15:50:35 UTC 2023 - Mohd Saquib <mohd.saquib@suse.com>

- Fixed an issue where yast2-vpn module breaks when strongswan is
updated to version >= 5.8.0 (boo#1176735)
- 4.6.1

-------------------------------------------------------------------
Fri Mar 03 14:44:07 UTC 2023 - Ladislav Slezák <lslezak@suse.cz>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-vpn.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-vpn
Version: 4.6.0
Version: 4.6.1
Release: 0
Url: https://github.com/yast/yast-vpn
Source0: %{name}-%{version}.tar.bz2
Expand Down
4 changes: 2 additions & 2 deletions src/lib/vpn/view_log_dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def restart_daemon_handler
_("Existing connections will be interrupted.\n" +
"Do you still wish to continue?")
)
if !(Yast::Service.Active("strongswan") ? Yast::Service.Restart("strongswan") : Yast::Service.Start("strongswan"))
if !(Yast::Service.Active("ipsec") ? Yast::Service.Restart("ipsec") : Yast::Service.Start("ipsec"))
Yast::Popup.Error(_("Failed to restart IPSec daemon"))
end
end
Expand All @@ -90,7 +90,7 @@ def finish_handler
private
# Read daemon status and refresh the content of log views.
def refresh_status
sh_daemon_status = Yast::SCR.Execute(Yast::Path.new(".target.bash_output"), "systemctl status strongswan")
sh_daemon_status = Yast::SCR.Execute(Yast::Path.new(".target.bash_output"), "systemctl status ipsec")
Yast::UI.ChangeWidget(Id(:daemon_status), :Value, sh_daemon_status["stdout"])

sh_conn_status = Yast::SCR.Execute(Yast::Path.new(".target.bash_output"), "ipsec statusall 2>&1")
Expand Down
10 changes: 5 additions & 5 deletions src/modules/IPSecConf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def Read
load_ipsec_conf_ini
load_ipsec_secrets_ini
# Read daemon settings
@enable_ipsec = Service.Enabled("strongswan")
@enable_ipsec = Service.Enabled("ipsec")
customrules_content = get_customrules_txt
@tcp_reduce_mss = customrules_content != nil && customrules_content.include?("--set-mss #{REDUCED_MSS}")
@autoyast_modified = true
Expand Down Expand Up @@ -172,14 +172,14 @@ def Write
SCR.Write(path(".etc.ipsec_secrets"), nil)
# Enable/disable daemon
if @enable_ipsec
Service.Enable("strongswan")
if !(Service.Active("strongswan") ? Service.Restart("strongswan") : Service.Start("strongswan"))
Service.Enable("strongswan-starter")
if !(Service.Active("ipsec") ? Service.Restart("ipsec") : Service.Start("ipsec"))
Report.Error(_("Failed to start IPSec daemon."))
successful = false
end
else
Service.Disable("strongswan")
Service.Stop("strongswan")
Service.Stop("ipsec")
Service.Disable("strongswan-starter")
end
# Configure IP forwarding
sysctlconfig_modified = false
Expand Down

0 comments on commit 7798e8c

Please sign in to comment.