slirp: Prepare for persistent socket state flags
This prepares for adding flags to socket.so_state that must not be
removed during the lifetime of a socket.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff --git a/slirp/udp.c b/slirp/udp.c
index d675ad3..3722845 100644
--- a/slirp/udp.c
+++ b/slirp/udp.c
@@ -666,7 +666,8 @@
if (flags != SS_FACCEPTONCE)
so->so_expire = 0;
- so->so_state = SS_ISFCONNECTED;
+ so->so_state &= SS_PERSISTENT_MASK;
+ so->so_state |= SS_ISFCONNECTED;
return so;
}