On Thu, Jun 7, 2012 at 3:16 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: > Il 07/06/2012 14:49, Zhi Yong Wu ha scritto: >>> > Instead, drop the NetSocketListenState struct and add a listen_fd field >>> > to NetSocketState. When a -netdev socket,listen= instance is created >>> > there will be a NetSocketState with fd=-1 and a valid listen_fd. The >> Have you considered the case where there're mulitple -net >> socket,listen= instance in one vlan? > > Why should that matter? They will have different NetSocketState and > different listen_fds. Each socket will discard incoming packets until > the other side connects.
Exactly, the key is that each -netdev has its own state struct. Stefan