mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
Kernel: Increase m_bytes_out only once during transmission
We were accidentally increasing m_bytes_out by the packet size and then immediately calling send_packet(), which did the same thing as well.
This commit is contained in:
parent
9ee5029bc5
commit
70fc0a528c
1 changed files with 0 additions and 1 deletions
|
@ -42,7 +42,6 @@ void NetworkAdapter::send(const MACAddress& destination, const ARPPacket& packet
|
|||
eth->set_source(mac_address());
|
||||
eth->set_destination(destination);
|
||||
eth->set_ether_type(EtherType::ARP);
|
||||
m_bytes_out += size_in_bytes;
|
||||
memcpy(eth->payload(), &packet, sizeof(ARPPacket));
|
||||
send_packet({ (const u8*)eth, size_in_bytes });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue