DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Roland Hieber <rhi@pengutronix.de>
To: distrokit@pengutronix.de
Cc: "Jürgen Borleis" <jbe@pengutronix.de>,
	"Roland Hieber" <rhi@pengutronix.de>
Subject: [DistroKit] [PATCH] v7a: run: really constrain the forwarded SSH port to <= 64000
Date: Mon, 15 Nov 2021 11:14:50 +0100	[thread overview]
Message-ID: <20211115101450.1404023-1-rhi@pengutronix.de> (raw)

The variable expansion braces should have been arithmetic evaluation
parentheses.

Fixes: d975eb8b04087f8606d8 (2021-04-26, "v7a: run: make the SSH forwarding port multiprocess-compatible")
Reported-by: Jürgen Borleis <jbe@pengutronix.de>
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 configs/platform-v7a/run | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/platform-v7a/run b/configs/platform-v7a/run
index 8af190f11eb4..d76c0969aa02 100755
--- a/configs/platform-v7a/run
+++ b/configs/platform-v7a/run
@@ -39,7 +39,7 @@ fi
 # the port to which an sshd would connect (in the emulated sysem)
 SSH_INTERNAL_PORT=22
 # the port which QEMU opens at the host side to give access to the ${SSH_INTERNAL_PORT}
-SSH_EXTERNAL_PORT=${QEMU_SSH_PORT:-${PPID%64000+1025}}
+SSH_EXTERNAL_PORT=${QEMU_SSH_PORT:-$((PPID%64000+1025))}
 
 # check if vde is available for networking
 if [ -z "${VDE_SOCKET}" ]; then
-- 
2.30.2


_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

             reply	other threads:[~2021-11-15 10:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15 10:14 Roland Hieber [this message]
2021-11-24 14:57 ` Robert Schwebel
2021-11-25 15:22   ` [DistroKit] [PATCH v2] " Roland Hieber
2021-11-25 16:14     ` Robert Schwebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211115101450.1404023-1-rhi@pengutronix.de \
    --to=rhi@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    --cc=jbe@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox