mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 01:08:48 +00:00
Kernel: Pass ipv4_packet_size
to ipv4.set_length()
Instead of `sizeof(IPv4Packet) + payload_size` expression, pass `ipv4_packet_size` to `ipv4.set_length()`
This commit is contained in:
parent
83a59396c8
commit
85feab4095
Notes:
sideshowbarker
2024-07-17 14:33:07 +09:00
Author: https://github.com/ImanSeyed 🔰
Commit: 85feab4095
Pull-request: https://github.com/SerenityOS/serenity/pull/17331
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ void NetworkAdapter::fill_in_ipv4_header(PacketWithTimestamp& packet, IPv4Addres
|
|||
ipv4.set_source(source_ipv4);
|
||||
ipv4.set_destination(destination_ipv4);
|
||||
ipv4.set_protocol((u8)protocol);
|
||||
ipv4.set_length(sizeof(IPv4Packet) + payload_size);
|
||||
ipv4.set_length(ipv4_packet_size);
|
||||
ipv4.set_ident(1);
|
||||
ipv4.set_ttl(ttl);
|
||||
ipv4.set_checksum(ipv4.compute_checksum());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue