arp: Trim the reply buffer to the filled length.
We reuse the incoming request buffer to send our reply. We did however not trim that buffer to the length we actually filled out, allowing any extraneous incoming data to remain in that buffer and be sent back.
This commit is contained in:
@@ -607,6 +607,7 @@ handle_arp_request(net_buffer *buffer, arp_header &header)
|
||||
buffer->flags = 0;
|
||||
// make sure this won't be a broadcast message
|
||||
|
||||
gBufferModule->trim(buffer, sizeof(arp_header));
|
||||
return entry->protocol->next->module->send_data(entry->protocol->next,
|
||||
buffer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user