mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
f932b6ce71
commit
6dd5ffb661
3 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue