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:
Michael Lotz
2018-11-17 00:34:49 +01:00
parent 76392ecac7
commit 14b0498cfa
@@ -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);
}