aboutsummaryrefslogtreecommitdiff
path: root/slirp/slirp.c
diff options
context:
space:
mode:
Diffstat (limited to 'slirp/slirp.c')
-rw-r--r--slirp/slirp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/slirp/slirp.c b/slirp/slirp.c
index 0ce62a37a6..9be8553130 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -794,19 +794,19 @@ int slirp_add_hostfwd(Slirp *slirp, int is_udp, struct in_addr host_addr,
}
int slirp_add_exec(Slirp *slirp, int do_pty, const void *args,
- struct in_addr guest_addr, int guest_port)
+ struct in_addr *guest_addr, int guest_port)
{
- if (!guest_addr.s_addr) {
- guest_addr.s_addr = slirp->vnetwork_addr.s_addr |
+ if (!guest_addr->s_addr) {
+ guest_addr->s_addr = slirp->vnetwork_addr.s_addr |
(htonl(0x0204) & ~slirp->vnetwork_mask.s_addr);
}
- if ((guest_addr.s_addr & slirp->vnetwork_mask.s_addr) !=
+ if ((guest_addr->s_addr & slirp->vnetwork_mask.s_addr) !=
slirp->vnetwork_addr.s_addr ||
- guest_addr.s_addr == slirp->vhost_addr.s_addr ||
- guest_addr.s_addr == slirp->vnameserver_addr.s_addr) {
+ guest_addr->s_addr == slirp->vhost_addr.s_addr ||
+ guest_addr->s_addr == slirp->vnameserver_addr.s_addr) {
return -1;
}
- return add_exec(&slirp->exec_list, do_pty, (char *)args, guest_addr,
+ return add_exec(&slirp->exec_list, do_pty, (char *)args, *guest_addr,
htons(guest_port));
}