aboutsummaryrefslogtreecommitdiff
path: root/slirp/slirp.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2009-06-24 14:42:29 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-29 08:52:45 -0500
commit6dd5ffb661a4aec28c8296b1673abdf280038cf6 (patch)
tree372c11006fda26038578d0686c387d34b15d93d1 /slirp/slirp.c
parentf932b6ce717e65687c3095e3e41a6c18972f996c (diff)
downloadqemu-6dd5ffb661a4aec28c8296b1673abdf280038cf6.zip
qemu-6dd5ffb661a4aec28c8296b1673abdf280038cf6.tar.gz
qemu-6dd5ffb661a4aec28c8296b1673abdf280038cf6.tar.bz2
slirp: Explicitely mark host-forwarding sockets
Mark sockets that describe host forwardings. This is required for their (and only their) proper deletion and for pretty-printing. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'slirp/slirp.c')
-rw-r--r--slirp/slirp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/slirp/slirp.c b/slirp/slirp.c
index 08c10f2..ad35c1f 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -793,11 +793,11 @@ int slirp_add_hostfwd(int is_udp, struct in_addr host_addr, int host_port,
}
if (is_udp) {
if (!udp_listen(host_addr.s_addr, htons(host_port), guest_addr.s_addr,
- htons(guest_port), 0))
+ htons(guest_port), SS_HOSTFWD))
return -1;
} else {
if (!tcp_listen(host_addr.s_addr, htons(host_port), guest_addr.s_addr,
- htons(guest_port), 0))
+ htons(guest_port), SS_HOSTFWD))
return -1;
}
return 0;