Skip to content
Snippets Groups Projects
  1. Oct 21, 2011
  2. Sep 28, 2011
    • Thomas Huth's avatar
      slirp: Fix packet expiration · 2b440432
      Thomas Huth authored
      
      The two new variables "arp_requested" and "expiration_date" in the mbuf
      structure have been added after the variable-sized "m_dat_" array. The
      variables have to be added before the m_dat_ array instead.
      Without this patch, the expiration_date gets clobbered by code that
      accesses the m_dat_ array.
      I experienced this problem with the code in slirp/tftp.c: The
      tftp_send_data() function created a new packet with the m_get()
      function (which fills-in a default expiration_date value). Then the
      TFTP code cleared the data section of the packet, which accidentially
      also cleared the expiration_date. This zeroed expiration_date then
      finally causes the packet to be discarded during if_start(), so that
      TFTP packets were not transmitted anymore.
      
      [Jan: added comment as suggested by Fabien ]
      
      CC: Fabien Chouteau <chouteau@adacore.com>
      Signed-off-by: default avatarThomas Huth <thuth@linux.vnet.ibm.com>
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
      2b440432
    • Jan Kiszka's avatar
      slirp: Fix use after release on tcp_input · 8d06d69b
      Jan Kiszka authored
      
      ti points into the m buffer. But the latter may already be released
      right after the dodata: label. Move the test before the potential
      release.
      
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
      8d06d69b
  3. Sep 16, 2011
  4. Sep 15, 2011
  5. Sep 09, 2011
  6. Sep 03, 2011
    • Stefan Weil's avatar
      Use new macro QEMU_PACKED for packed structures · 541dc0d4
      Stefan Weil authored
      
      Most changes were made using these commands:
      
      git grep -la '__attribute__((packed))'|xargs perl -pi -e 's/__attribute__\(\(packed\)\)/QEMU_PACKED/'
      git grep -la '__attribute__ ((packed))'|xargs perl -pi -e 's/__attribute__ \(\(packed\)\)/QEMU_PACKED/'
      git grep -la '__attribute__((__packed__))'|xargs perl -pi -e 's/__attribute__\(\(__packed__\)\)/QEMU_PACKED/'
      git grep -la '__attribute__ ((__packed__))'|xargs perl -pi -e 's/__attribute__ \(\(__packed__\)\)/QEMU_PACKED/'
      git grep -la '__attribute((packed))'|xargs perl -pi -e 's/__attribute\(\(packed\)\)/QEMU_PACKED/'
      
      Whitespace in linux-user/syscall_defs.h was fixed manually
      to avoid warnings from scripts/checkpatch.pl.
      
      Manual changes were also applied to hw/pc.c.
      
      I did not fix indentation with tabs in block/vvfat.c.
      The patch will show 4 errors with scripts/checkpatch.pl.
      
      Signed-off-by: default avatarStefan Weil <weil@mail.berlios.de>
      Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
      541dc0d4
  7. Aug 22, 2011
  8. Aug 21, 2011
  9. Aug 15, 2011
  10. Aug 05, 2011
  11. Aug 03, 2011
  12. Jul 27, 2011
  13. Jul 25, 2011
    • Blue Swirl's avatar
      Wrap recv to avoid warnings · 00aa0040
      Blue Swirl authored
      
      Avoid warnings like these by wrapping recv():
        CC    slirp/ip_icmp.o
      /src/qemu/slirp/ip_icmp.c: In function 'icmp_receive':
      /src/qemu/slirp/ip_icmp.c:418:5: error: passing argument 2 of 'recv' from incompatible pointer type [-Werror]
      /usr/local/lib/gcc/i686-mingw32msvc/4.6.0/../../../../i686-mingw32msvc/include/winsock2.h:547:32: note: expected 'char *' but argument is of type 'struct icmp *'
      
      Remove also casts used to avoid warnings.
      
      Reviewed-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
      00aa0040
  14. Jul 23, 2011
  15. Mar 29, 2011
  16. Mar 21, 2011
    • Paolo Bonzini's avatar
      change all rt_clock references to use millisecond resolution accessors · 7bd427d8
      Paolo Bonzini authored
      
      This was done with:
      
          sed -i '/get_clock\>.*rt_clock/s/get_clock\>/get_clock_ms/' \
              $(git grep -l 'get_clock\>.*rt_clock' )
          sed -i '/new_timer\>.*rt_clock/s/new_timer\>/new_timer_ms/' \
              $(git grep -l 'new_timer\>.*rt_clock' )
      
      after checking that get_clock and new_timer never occur twice
      on the same line.  There were no missed occurrences; however, even
      if there had been, they would have been caught by the compiler.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      7bd427d8
  17. Mar 05, 2011
  18. Feb 25, 2011
  19. Feb 14, 2011
  20. Jan 23, 2011
  21. Jan 13, 2011
  22. Jan 10, 2011
    • Aurelien Jarno's avatar
      slirp: fix unaligned access in bootp code · 8aaf42ed
      Aurelien Jarno authored
      
      Slirp code tries to be smart an avoid data copy by using pointer to
      the data. This solution leads to unaligned access, in this case
      preq_addr, which is a 32-bit long structure. There is no real point
      of avoiding data copy in a such case, as the value itself is smaller
      or the same size as a pointer.
      
      The patch replaces pointers to the preq_addr structure by the strcture
      itself, and use the address 0.0.0.0 if no address has been requested
      (this is not a valid address in such a request). It compares it with
      htonl(0L) for correctness reasons, in case a code checker look for such
      mistakes. It also uses memcpy() for copying the data, which takes care
      of alignement issues.
      
      This fixes an unaligned access on IA64 host while requesting a DHCP
      address.
      
      Signed-off-by: default avatarAurelien Jarno <aurelien@aurel32.net>
      8aaf42ed
  23. Nov 21, 2010
  24. Oct 03, 2010
  25. Sep 17, 2010
  26. Sep 04, 2010
  27. Jul 25, 2010
  28. Jul 06, 2010
Loading