summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-05-11 23:54:05 +0200
committerPeter Wu <peter@lekensteyn.nl>2018-05-12 00:48:05 +0200
commit6ee7781d8464dc3298b1157389df9785e20ce041 (patch)
treeabe6e6685851e92ebf1365902bc087ef33baceae /target
parentbfffafbb520c9eb72cfba950e245946dc7c9a59d (diff)
downloadqemu-slirp-fixes.tar.gz
slirp: clean up guestfwd command executionslirp-fixes
The previous guestfwd command execution functionality created a TCP socket for communication with the child. Besides being convoluted, this also had a practical performance issue: communications with the child process (e.g. netcat) could stall for 40ms due to delayed ack. As fork_exec has a lot of cruft (unused telnetd/pty code, whitespace issues, racy connect/accept logic) and a buffer overflow while building argv in the child ("guestfwd=tcp:0.0.0.0:80-cmd:$(printf %300s)"), just rewrite the whole thing to use socketpair with a local socket. Tested with a Windows 7 guest, using guestfwd (+netcat) to connect to a SMB server. Executing an installer from the share now does not take ages and a packet capture shows no 40ms latency in the guest. Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'target')
0 files changed, 0 insertions, 0 deletions