1. 19 12月, 2014 3 次提交
  2. 21 11月, 2014 2 次提交
  3. 18 11月, 2014 1 次提交
  4. 17 11月, 2014 1 次提交
  5. 14 11月, 2014 1 次提交
  6. 11 11月, 2014 1 次提交
    • P
      slirp/smbd: modify/set several parameters in generated smbd.conf · 7912d04b
      Peter Wu 提交于
      The file sharing module should not handle printers, so disable it.
      The options 'load printers' and 'printing' have been available since the
      beginning (May 1996, commit 0e8fd3398771da2f016d72830179507f3edda51b).
      Option 'disable spoolss' is available since Samba 2.0.4, commit
      de5f42c9d9172592779fa2504d44544e3b6b1c0d).
      
      Next, "socket address" was reported as deprecated, use a combination of
      "interfaces" and "bind interfaces only" instead (available since October
      1997, commit 79f4fb52c1ed56fd843f81b4eb0cdd2991d4d0f4).
      
      Override cache directory to avoid writing to a global directory. Option
      available since Samba 3.4.0, Jan 2009, commit
      19a05bf2f485023b11b41dfae3f6459847d55ef7.
      
      Set "usershare max shared=0" to prevent a global directory from being
      used. Option available since Samba 3.0.23, February 2006, commit
      5831715049f2d460ce42299963a5defdc160891b.
      
      The last option was introduced with Samba 3.4.0, but previously
      "state directory" was already added which exists in Samba 3.4.0. As
      unknown parameters are ignored (while printing a warning), it should be
      safe to add another option.
      Signed-off-by: NPeter Wu <peter@lekensteyn.nl>
      Cc: Jan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      7912d04b
  7. 02 11月, 2014 4 次提交
  8. 05 9月, 2014 2 次提交
  9. 04 9月, 2014 1 次提交
    • Z
      net: Forbid dealing with packets when VM is not running · e1d64c08
      zhanghailiang 提交于
      For all NICs(except virtio-net) emulated by qemu,
      Such as e1000, rtl8139, pcnet and ne2k_pci,
      Qemu can still receive packets when VM is not running.
      
      If this happened in *migration's* last PAUSE VM stage, but
      before the end of the migration, the new receiving packets will possibly dirty
      parts of RAM which has been cached in *iovec*(will be sent asynchronously) and
      dirty parts of new RAM which will be missed.
      This will lead serious network fault in VM.
      
      To avoid this, we forbid receiving packets in generic net code when
      VM is not running.
      
      Bug reproduction steps:
      (1) Start a VM which configured at least one NIC
      (2) In VM, open several Terminal and do *Ping IP -i 0.1*
      (3) Migrate the VM repeatedly between two Hosts
      And the *PING* command in VM will very likely fail with message:
      'Destination HOST Unreachable', the NIC in VM will stay unavailable unless you
      run 'service network restart'
      Signed-off-by: Nzhanghailiang <zhang.zhanghailiang@huawei.com>
      Reviewed-by: NJason Wang <jasowang@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      e1d64c08
  10. 03 9月, 2014 1 次提交
  11. 01 8月, 2014 1 次提交
  12. 18 7月, 2014 1 次提交
  13. 02 7月, 2014 1 次提交
  14. 27 6月, 2014 2 次提交
  15. 19 6月, 2014 4 次提交
  16. 11 6月, 2014 1 次提交
  17. 16 5月, 2014 1 次提交
  18. 28 4月, 2014 2 次提交
  19. 25 4月, 2014 4 次提交
  20. 18 4月, 2014 1 次提交
  21. 25 3月, 2014 1 次提交
  22. 12 3月, 2014 3 次提交
    • S
      tap: avoid deadlocking rx · 68e5ec64
      Stefan Hajnoczi 提交于
      The net subsystem has a control flow mechanism so peer NetClientStates
      can tell each other to stop sending packets.  This is used to stop
      monitoring the tap file descriptor for incoming packets if the guest rx
      ring has no spare buffers.
      
      There is a corner case when tap_can_send() is true at the beginning of
      an event loop iteration but becomes false before the tap_send() fd
      handler is invoked.
      
      tap_send() will read the packet from the tap file descriptor and attempt
      to send it.  The net queue will hold on to the packet and return 0,
      indicating that further I/O is not possible.  tap then stops monitoring
      the file descriptor for reads.
      
      This is unlike the normal case where tap_can_send() is the same before
      and during the event loop iteration.  The event loop would simply not
      monitor the file descriptor if tap_can_send() returns true.  Upon next
      iteration it would check tap_can_send() again and begin monitoring if we
      can send.
      
      The deadlock happens because tap_send() explicitly disabled read_poll.
      This is done with the expectation that the peer will call
      qemu_net_queue_flush().  But hw/net/virtio-net.c does not monitor
      vm_running transitions and issue the flush.  Hence we're left with a
      broken tap device.
      
      Cc: qemu-stable@nongnu.org
      Reported-by: NNeil Skrypuch <neil@tembosocial.com>
      Tested-by: NNeil Skrypuch <neil@tembosocial.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      68e5ec64
    • M
      slirp smb with modern win guests when samba is also running on host · 5c1e1890
      Michael Tokarev 提交于
      After numerous reports that -smb (or -netdev user,smb=foo) not working
      with modern windows (win7 and vista are reported as non-working), I
      started digging myself.  And found that indeed it doesn't work, and
      why.
      
      The thing is that modern win tries to connect to port 445 (microsoft-ds)
      first, and if that fails, it falls back to old port 139 (netbios-ssn).
      
      slirp code in qemu only redirects port 139, it does not touch port 445.
      
      So the prob is that if samba is also running on the host, guest will try
      to communicate using port 445, and that will succed, but ofcourse guest
      will not talk with our samba but with samba running on the host.
      
      If samba is not running on the host, guest will fall back to port 139,
      and will reach the redirecting rule and qemu will spawn smbd correctly.
      
      The solution is to redirect both ports (139 and 445), and the fix is
      a one-liner, adding second call to slirp_add_exec() at the end of
      net/slirp.c:slirp_smb() function (provided below).
      
      But it looks like that is not a proper fix really, since in theory
      we should redirect both ports to the SAME, single samba instance,
      but I'm not sure this is possible with slirp.  Well, even if two
      smbd processes will be run on the same config dir, it should not
      be a problem.
      
      The one-liner (not exactly 1 since it touches previous line too) is like
      this:
      Signed-off-By: NMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      5c1e1890
    • M
      qemu/slirp: Fix SMB security configuration on newer samba versions · c2804ee6
      Michael Buesch 提交于
      The smb.conf automatically generated by qemu's -smb option fails on current
      samba, because smbd rejects the security=share option with the following warning:
      
      >   WARNING: Ignoring invalid value 'share' for parameter 'security'
      
      Which makes it fall back to security=user without guest login.
      This results in being unable to login to the samba server from the guest OS.
      
      This fixes it by selecting 'user' explicitly and mapping
      unknown users to guest logins.
      Signed-off-by: NMichael Buesch <m@bues.ch>
      Reviewed-by: NMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      c2804ee6
  23. 25 2月, 2014 1 次提交
    • S
      net: remove implicit peer from offload API · d6085e3a
      Stefan Hajnoczi 提交于
      The virtio_net offload APIs are used on the NIC's peer (i.e. the tap
      device).  The API was defined to implicitly use nc->peer, saving the
      caller the trouble.
      
      This wasn't ideal because:
      1. There are callers who have the peer but not the NIC.  Currently they
         are forced to bypass the API and access peer->info->... directly.
      2. The rest of the net.h API uses nc, not nc->peer, so it is
         inconsistent.
      
      This patch pushes nc->peer back up to callers.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      d6085e3a