1. 03 3月, 2018 1 次提交
    • M
      net: fix misaligned member access · 4f51e1d3
      Marc-André Lureau 提交于
      Fixes the following ASAN warnings:
      
      /home/elmarco/src/qemu/hw/net/net_tx_pkt.c:201:27: runtime error: member access within misaligned address 0x631000028846 for type 'struct ip_header', which requires 4 byte alignment
      0x631000028846: note: pointer points here
       01 00 00 00 45 00  01 a9 01 00 00 00 40 11  78 45 00 00 00 00 ff ff  ff ff 00 00 00 00 00 00  00 00
                   ^
      /home/elmarco/src/qemu/hw/net/net_tx_pkt.c:208:63: runtime error: member access within misaligned address 0x631000028846 for type 'struct ip_header', which requires 4 byte alignment
      0x631000028846: note: pointer points here
       01 00 00 00 45 00  01 a9 01 00 00 00 40 11  78 45 00 00 00 00 ff ff  ff ff 00 00 00 00 00 00  00 00
                   ^
      /home/elmarco/src/qemu/hw/net/net_tx_pkt.c:210:13: runtime error: member access within misaligned address 0x631000028846 for type 'struct ip_header', which requires 4 byte alignment
      0x631000028846: note: pointer points here
       01 00 00 00 45 00  01 a9 01 00 00 00 40 11  78 45 00 00 00 00 ff ff  ff ff 00 00 00 00 00 00  00 00
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 20180209190340.19516-1-marcandre.lureau@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      4f51e1d3
  2. 20 11月, 2017 1 次提交
    • E
      net: Transmit zero UDP checksum as 0xFFFF · 0dacea92
      Ed Swierk 提交于
      The checksum algorithm used by IPv4, TCP and UDP allows a zero value
      to be represented by either 0x0000 and 0xFFFF. But per RFC 768, a zero
      UDP checksum must be transmitted as 0xFFFF because 0x0000 is a special
      value meaning no checksum.
      
      Substitute 0xFFFF whenever a checksum is computed as zero when
      modifying a UDP datagram header. Doing this on IPv4 and TCP checksums
      is unnecessary but legal. Add a wrapper for net_checksum_finish() that
      makes the substitution.
      
      (We can't just change net_checksum_finish(), as that function is also
      used by receivers to verify checksums, and in that case the expected
      value is always 0x0000.)
      Signed-off-by: NEd Swierk <eswierk@skyportsystems.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      0dacea92
  3. 18 8月, 2016 1 次提交
  4. 09 8月, 2016 1 次提交
  5. 17 6月, 2016 1 次提交
  6. 02 6月, 2016 3 次提交
  7. 29 1月, 2016 1 次提交
  8. 12 10月, 2015 1 次提交
  9. 27 7月, 2013 1 次提交
  10. 16 4月, 2013 1 次提交
  11. 09 4月, 2013 1 次提交
  12. 25 3月, 2013 1 次提交