From: Roland Hieber <rhi@pengutronix.de>
To: distrokit@pengutronix.de
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [DistroKit] [RESEND][PATCH v1 6/6] v7a_noneon: run: really constrain the forwarded SSH port to <= 64000
Date: Wed, 14 Aug 2024 11:32:09 +0200 [thread overview]
Message-ID: <20240814093207.606528-7-rhi@pengutronix.de> (raw)
In-Reply-To: <20240814093207.606528-1-rhi@pengutronix.de>
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
The variable expansion braces should have been arithmetic evaluation
parentheses, which had the effect that the PPID was always used as a
port number (which incidentally works fine for PPIDs < 65535).
This was fixed in configs/platform-v7a/run by commit
fb3e1645e6b5 ("v7a: run: really constrain the forwarded SSH port to <= 64000"),
so apply the same fix here.
Fixes: 5d2b3d23b2da ("platform-v7a_noneon: sama5: platform w/out NEON extension")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
configs/platform-v7a_noneon/run | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configs/platform-v7a_noneon/run b/configs/platform-v7a_noneon/run
index ccdcdb91c767..0307e982a334 100755
--- a/configs/platform-v7a_noneon/run
+++ b/configs/platform-v7a_noneon/run
@@ -31,10 +31,10 @@ if [ ! -e "${QEMU_EXEC}" ]; then
exit 1
fi
-# the port to which an sshd would connect (in the emulated sysem)
+# the port to which an sshd would connect (in the emulated system)
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.39.2
next prev parent reply other threads:[~2024-08-14 9:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-14 9:32 [DistroKit] [RESEND][PATCH v1 0/6] v7a_noneon: barebox update Roland Hieber
2024-08-14 9:32 ` [DistroKit] [RESEND][PATCH v1 1/6] v7a_noneon: barebox: update to v2024.07.0 Roland Hieber
2024-08-14 9:32 ` [DistroKit] [RESEND][PATCH v1 2/6] v7a_noneon: barebox: don't activate all consoles by default Roland Hieber
2024-08-14 9:32 ` [DistroKit] [RESEND][PATCH v1 3/6] v7a_noneon: barebox: use ARM-optimized routines where appropriate Roland Hieber
2024-08-14 9:32 ` [DistroKit] [RESEND][PATCH v1 4/6] v7a_noneon: barebox: enable of_diff command Roland Hieber
2024-08-14 9:32 ` [DistroKit] [RESEND][PATCH v1 5/6] v7a_noneon: generate vexpress.norimg by default Roland Hieber
2024-08-14 9:32 ` Roland Hieber [this message]
2024-08-14 10:03 ` [DistroKit] [RESEND][PATCH v1 0/6] v7a_noneon: barebox update 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=20240814093207.606528-7-rhi@pengutronix.de \
--to=rhi@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=distrokit@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