]> git.proxmox.com Git - qemu.git/commitdiff
slirp: Mark sockets of incoming TCP connections
authorJan Kiszka <jan.kiszka@siemens.com>
Wed, 24 Jun 2009 12:42:29 +0000 (14:42 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 29 Jun 2009 13:52:46 +0000 (08:52 -0500)
Required for pretty-printing.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
slirp/socket.h
slirp/tcp_subr.c

index 979b1915c1cd5f339bc04aebd8c7d18b74b561b1..d241a48ca2ebe9b673a11dd1953a91a12dba0be2 100644 (file)
@@ -73,6 +73,7 @@ struct socket {
 
 #define SS_PERSISTENT_MASK     0xf000  /* Unremovable state bits */
 #define SS_HOSTFWD             0x1000  /* Socket describes host->guest forwarding */
+#define SS_INCOMING            0x2000  /* Connection was initiated by a host on the internet */
 
 extern struct socket tcb;
 
index 6fa4223a4e36a3bcb1ceef00f67820edda6a27b8..219f1dd00557c3c0acf595ca446c0818d9cdef9a 100644 (file)
@@ -483,6 +483,7 @@ tcp_connect(struct socket *inso)
                                           /* if it's not FACCEPTONCE, it's already NOFDREF */
        }
        so->s = s;
+       so->so_state |= SS_INCOMING;
 
        so->so_iptos = tcp_tos(so);
        tp = sototcpcb(so);