]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
qemurunner.py: support setting slirp host IP address
authorMikko Rapeli <mikko.rapeli@linaro.org>
Mon, 14 Nov 2022 15:50:37 +0000 (17:50 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 20 Nov 2022 08:20:27 +0000 (08:20 +0000)
commitbdbd52082eb26f418000eb4e424baae9babc272c
treed4ad0298341006e5ed2b8334a28a47fdc90550da
parent056431883e94296b767a479d029b914392e4fd7c
qemurunner.py: support setting slirp host IP address

By default host side IP address is not set and qemu listens
on all IP addresses on the host machine which is not a good
idea when images have root login enabled without password.
It make sense to listen only on localhost IP address 127.0.0.1 using
config change like:

QB_SLIRP_OPT = "-netdev user,id=net0,hostfwd=tcp:127.0.0.1:2222-:22"

This config works for qemu itself, but breaks runqemu which tries to
parse the host side port number from qemu process command line arguments.
So change the runqemu side hostfwd parsing for port number to ignore
the host IP address field.

Reviewed-by: Quentin Schulz <foss+yocto@0leil.net>
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/lib/oeqa/utils/qemurunner.py