summaryrefslogtreecommitdiff
path: root/slirp/tcp_subr.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-08 19:18:21 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-08 19:18:21 +0000
commit443464587a9c4e66ca14df4816c8448fe2950fab (patch)
treec88f13940cab1cc4824cee90109fe93d6ffd3670 /slirp/tcp_subr.c
parent8c916b6a2d077cb436860a3924f8cc4b881b3811 (diff)
downloadqemu-443464587a9c4e66ca14df4816c8448fe2950fab.tar.gz
qemu-443464587a9c4e66ca14df4816c8448fe2950fab.tar.bz2
qemu-443464587a9c4e66ca14df4816c8448fe2950fab.zip
Redirect slirp traffic to/from qemu character device (Gleb Natapov)
Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6240 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'slirp/tcp_subr.c')
-rw-r--r--slirp/tcp_subr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
index bce07a6cbd..12abebeb96 100644
--- a/slirp/tcp_subr.c
+++ b/slirp/tcp_subr.c
@@ -1281,6 +1281,11 @@ tcp_ctl(so)
for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) {
if (ex_ptr->ex_fport == so->so_fport &&
command == ex_ptr->ex_addr) {
+ if (ex_ptr->ex_pty == 3) {
+ so->s = -1;
+ so->extra = ex_ptr->ex_exec;
+ return 1;
+ }
do_pty = ex_ptr->ex_pty;
goto do_exec;
}