On 11/30/2016 02:24 AM, Randy Witt wrote:
"-device virtio-net-device,netdev=net0" and
"-netdev user,id=net0,hostfwd=tcp::2222-:22"
Then there is no way for user to override the second part, and we can't
call the first part as a "QB_SLIRP_OPT" since it is only part of them,
so I won't break them into 2, and if the user defines QB_SLIRP_OPT
in there bsp conf file, then it will be replaced totally.
I'm aware that this will only work for one instance, but currently it doesn't
work at all and it blocks a high priority bug. The only way to make it 100%
work, would be to have qemu do the binding of the port to a dynamic one and then
the user queries it after. Otherwise there is always a window where another
process could bind to the port.
We can check whether the port is free and use another one if not, we've
already done similar things in runqemu-export-rootfs for nfs, please see:
http://lists.openembedded.org/pipermail/openembedded-core/2016-November/129376.html
// Robert
I don't think the bsp should be in the business of choosing which ports to
forward. And if it is, then it should be a separate option in the qemuboot.conf,
with just the "-netdev user" part because otherwise the user will always have to
modify qemuboot.conf just to forward different ports.
It makes more sense to let the user do something like "runqemu slirp=22,65,..."
and then return back the actual port used in the forwarding.
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core