mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-02 22:03:01 +02:00
qemu: Support passing custom options to setup user mode networking
This can be used to specify things like port forwards, TFTP server, etc.
This commit is contained in:
@@ -61,6 +61,12 @@ config QEMU_NET_BRIDGE_DEV
|
||||
depends on QEMU_NET_BRIDGE
|
||||
default "virbr0"
|
||||
|
||||
config QEMU_NET_USER_OPTS
|
||||
string "User mode options"
|
||||
depends on QEMU_NET_USER
|
||||
help
|
||||
Extra -nic user,<OPTIONS>
|
||||
|
||||
config QEMU_NET_TAP_N
|
||||
int "Number of TAPs"
|
||||
depends on QEMU_NET_TAP
|
||||
|
||||
+3
-1
@@ -75,7 +75,9 @@ net_args()
|
||||
echo -n "-nic tap,ifname=qtap$i,script=no,model=$QEMU_NET_MODEL "
|
||||
done
|
||||
elif [ "$QEMU_NET_USER" = "y" ]; then
|
||||
echo -n "-nic user,model=$QEMU_NET_MODEL "
|
||||
[ "$QEMU_NET_USER_OPTS" ] && QEMU_NET_USER_OPTS="$QEMU_NET_USER_OPTS,"
|
||||
|
||||
echo -n "-nic user,${QEMU_NET_USER_OPTS}model=$QEMU_NET_MODEL "
|
||||
else
|
||||
echo -n "-nic none"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user