Commit 4a82347a470eb087b2cb3075c506c42051d20230

Authored by Jan Kiszka
Committed by Anthony Liguori
1 parent 9c12a6f2

slirp: Mark sockets of incoming TCP connections

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
... ... @@ -73,6 +73,7 @@ struct socket {
73 73  
74 74 #define SS_PERSISTENT_MASK 0xf000 /* Unremovable state bits */
75 75 #define SS_HOSTFWD 0x1000 /* Socket describes host->guest forwarding */
  76 +#define SS_INCOMING 0x2000 /* Connection was initiated by a host on the internet */
76 77  
77 78 extern struct socket tcb;
78 79  
... ...
slirp/tcp_subr.c
... ... @@ -483,6 +483,7 @@ tcp_connect(struct socket *inso)
483 483 /* if it's not FACCEPTONCE, it's already NOFDREF */
484 484 }
485 485 so->s = s;
  486 + so->so_state |= SS_INCOMING;
486 487  
487 488 so->so_iptos = tcp_tos(so);
488 489 tp = sototcpcb(so);
... ...