aboutsummaryrefslogtreecommitdiff
path: root/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
commit8a83e031bcc60c0fbfee518a265ee8b7c12c1e36 (patch)
tree1f00bc88e1b58a29934a5b60294d6bac832c7566 /tcp_subr.c
parent383589c12e3f2e0e34058be7901ba080dd73722c (diff)
downloadslirp-8a83e031bcc60c0fbfee518a265ee8b7c12c1e36.zip
slirp-8a83e031bcc60c0fbfee518a265ee8b7c12c1e36.tar.gz
slirp-8a83e031bcc60c0fbfee518a265ee8b7c12c1e36.tar.bz2
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 'tcp_subr.c')
-rw-r--r--tcp_subr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tcp_subr.c b/tcp_subr.c
index d41ef44..86946a9 100644
--- a/tcp_subr.c
+++ b/tcp_subr.c
@@ -1271,6 +1271,11 @@ int tcp_ctl(so) struct socket *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;
}