]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/net/virtio-net.c
net: checksum: Introduce fine control over checksum type
[mirror_qemu.git] / hw / net / virtio-net.c
index 09ceb02c9d932a155df78338ffeee22f9bcf0c2e..5150f295e8c5df0911c42c5647d9e8644edb30df 100644 (file)
@@ -1464,7 +1464,7 @@ static void work_around_broken_dhclient(struct virtio_net_hdr *hdr,
         (buf[12] == 0x08 && buf[13] == 0x00) && /* ethertype == IPv4 */
         (buf[23] == 17) && /* ip.protocol == UDP */
         (buf[34] == 0 && buf[35] == 67)) { /* udp.srcport == bootps */
-        net_checksum_calculate(buf, size);
+        net_checksum_calculate(buf, size, CSUM_UDP);
         hdr->flags &= ~VIRTIO_NET_HDR_F_NEEDS_CSUM;
     }
 }