nanovms / nanos

A kernel designed to run one and only one application in a virtualized environment
https://nanos.org
Apache License 2.0
2.58k stars 133 forks source link

Hyper-V: netvsc: fix setting of pbuf length in received packets #1997

Closed francescolavra closed 6 months ago

francescolavra commented 7 months ago

The existing code is setting the tot_len field of the first struct of a pbuf chain to a value double the correct value, and is failing to update the tot_len value of all pbufs in a chain when appending received data. This change fixes the above issues, which were causing a page fault in the pbuf_realloc() lwIP function during reception of an IPv6 packet.