* [pve-devel] [PATCH guest-common] tunnel: improve version error handling
@ 2025-04-18 8:36 Fabian Grünbichler
2025-05-27 9:50 ` [pve-devel] applied: " Fiona Ebner
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Grünbichler @ 2025-04-18 8:36 UTC (permalink / raw)
To: pve-devel
prevent a warning about $ver being an uninitialized value in case the tunnel
didn't provide a version string at all, for example because it already closed
cause of a prior error.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
prompted by https://bugzilla.proxmox.com/show_bug.cgi?id=6340
src/PVE/Tunnel.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/PVE/Tunnel.pm b/src/PVE/Tunnel.pm
index 4f8df8e..30cebfc 100644
--- a/src/PVE/Tunnel.pm
+++ b/src/PVE/Tunnel.pm
@@ -179,7 +179,9 @@ sub fork_ssh_tunnel {
eval {
my $ver = read_tunnel($tunnel, 10);
- if ($ver =~ /^ver (\d+)$/) {
+ if (!defined($ver)) {
+ $err = "failed to receive tunnel version string\n" if !$err;
+ } elsif ($ver =~ /^ver (\d+)$/) {
$tunnel->{version} = $1;
$log->('info', "ssh tunnel $ver\n");
} else {
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH guest-common] tunnel: improve version error handling
2025-04-18 8:36 [pve-devel] [PATCH guest-common] tunnel: improve version error handling Fabian Grünbichler
@ 2025-05-27 9:50 ` Fiona Ebner
0 siblings, 0 replies; 2+ messages in thread
From: Fiona Ebner @ 2025-05-27 9:50 UTC (permalink / raw)
To: pve-devel, Fabian Grünbichler
On Fri, 18 Apr 2025 10:36:58 +0200, Fabian Grünbichler wrote:
> prevent a warning about $ver being an uninitialized value in case the tunnel
> didn't provide a version string at all, for example because it already closed
> cause of a prior error.
Applied, thanks!
[1/1] tunnel: improve version error handling
commit: e594fa6cf9b318763b1fa9033a5c460e92fa6a95
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-27 9:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-18 8:36 [pve-devel] [PATCH guest-common] tunnel: improve version error handling Fabian Grünbichler
2025-05-27 9:50 ` [pve-devel] applied: " Fiona Ebner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal