Path: blob/main/website/static/security/patches/EN-13:02/vtnet.patch
18096 views
Index: sys/dev/virtio/network/if_vtnet.c1===================================================================2--- sys/dev/virtio/network/if_vtnet.c (revision 252193)3+++ sys/dev/virtio/network/if_vtnet.c (revision 252194)4@@ -2470,9 +2470,9 @@ vtnet_rx_filter_mac(struct vtnet_softc *sc)5sglist_init(&sg, 4, segs);6error |= sglist_append(&sg, &hdr, sizeof(struct virtio_net_ctrl_hdr));7error |= sglist_append(&sg, &filter->vmf_unicast,8- sizeof(struct vtnet_mac_table));9+ sizeof(uint32_t) + filter->vmf_unicast.nentries * ETHER_ADDR_LEN);10error |= sglist_append(&sg, &filter->vmf_multicast,11- sizeof(struct vtnet_mac_table));12+ sizeof(uint32_t) + filter->vmf_multicast.nentries * ETHER_ADDR_LEN);13error |= sglist_append(&sg, &ack, sizeof(uint8_t));14KASSERT(error == 0 && sg.sg_nseg == 4,15("error adding MAC filtering message to sglist"));161718