1. 29 2月, 2012 22 次提交
  2. 28 2月, 2012 1 次提交
  3. 27 2月, 2012 4 次提交
    • D
      slirp: Fix assertion failure on rejected DHCP requests · 90d7416a
      David Gibson 提交于
      The guest network stack might DHCPREQUEST an address that the slirp built
      in dhcp server can't let it have - for example if the guest has an old
      leases file from another network configuration.  In this case the dhcp
      server should and does reject the request and prepares to send a DHCPNAK
      to the client.
      
      However, in this case the daddr variable in bootp_reply() is set to
      0.0.0.0.  Shortly afterwards, it unconditionally attempts to pre-insert the
      new client address into the ARP table.  This causes an assertion failure in
      arp_address_add() because of the 0.0.0.0 address.
      
      According to RFC2131, DHCPNAK messages for clients on the same subnet
      must be sent to the broadcast address (S3.2, subpoint 2).
      
      Cc: Jan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      90d7416a
    • J
      slirp: Refactor if_start · b87ffa16
      Jan Kiszka 提交于
      Replace gotos with a while loop, fix coding style.
      
      CC: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
      CC: Fabien Chouteau <chouteau@adacore.com>
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      b87ffa16
    • J
      slirp: Fix requeuing of batchq packets in if_start · b248ede2
      Jan Kiszka 提交于
      In case we requeued a packet that was the head of a longer session
      queue, we failed to restore this ordering. Also, we did not properly
      deal with changes to Slirp::next_m.
      
      Instead of a cumbersome roll back, this fix simply avoids any changes
      until we know if the packet was actually sent. Both fixes crashes due
      to inconsistent queues and simplifies the logic.
      
      Thanks to Zhi Yong Wu who found the reason for these crashes.
      
      CC: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
      CC: Fabien Chouteau <chouteau@adacore.com>
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      b248ede2
    • J
      slirp: Clean up ifs_init · 79e7e937
      Jan Kiszka 提交于
      Remove duplicate ifs_init macros, reimplement the logic as static inline
      in mbuf.h.
      
      CC: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
      CC: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      79e7e937
  4. 25 2月, 2012 13 次提交