diff options
author | Nicholas Ngai <nicholas@ngai.me> | 2021-11-29 16:21:17 -0800 |
---|---|---|
committer | Nicholas Ngai <nicholas@ngai.me> | 2021-11-29 16:21:17 -0800 |
commit | d2eb3b45aae71b3831fbf658d18b78b53eba23f9 (patch) | |
tree | b4fd2c6ea37501935ecbdeeab7738fcfd95bb354 /src/socket.c | |
parent | 87ea58f2f5a99515fd6544aa1a66bbfb26af2b6f (diff) | |
download | slirp-d2eb3b45aae71b3831fbf658d18b78b53eba23f9.zip slirp-d2eb3b45aae71b3831fbf658d18b78b53eba23f9.tar.gz slirp-d2eb3b45aae71b3831fbf658d18b78b53eba23f9.tar.bz2 |
socket: Add s_aux field to struct socket for storing auxilliary socket
Signed-off-by: Nicholas Ngai <nicholas@ngai.me>
Diffstat (limited to 'src/socket.c')
-rw-r--r-- | src/socket.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/socket.c b/src/socket.c index 7869e6a..a92cfd3 100644 --- a/src/socket.c +++ b/src/socket.c @@ -50,6 +50,7 @@ struct socket *socreate(Slirp *slirp) memset(so, 0, sizeof(struct socket)); so->so_state = SS_NOFDREF; so->s = -1; + so->s_aux = -1; so->slirp = slirp; so->pollfds_idx = -1; @@ -1098,7 +1099,7 @@ void sotranslate_accept(struct socket *so) closesocket(s); goto unix2inet_cont; } - so->s = s; + so->s_aux = s; so->so_fport = in_addr.sin_port; unix2inet_cont: @@ -1132,7 +1133,7 @@ unix2inet_cont: closesocket(s); goto unix2inet6_cont; } - so->s = s; + so->s_aux = s; so->so_fport6 = in6_addr.sin6_port; unix2inet6_cont: |