mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 15:19:42 +00:00
Kernel: Use KResult a bit more in the IPv4 networking code
This commit is contained in:
parent
b00799b9ce
commit
9984201634
Notes:
sideshowbarker
2024-07-18 22:41:57 +09:00
Author: https://github.com/awesomekling
Commit: 9984201634
7 changed files with 23 additions and 21 deletions
|
@ -282,7 +282,7 @@ void handle_icmp(const EthernetFrameHeader& eth, const IPv4Packet& ipv4_packet,
|
|||
response.header.set_checksum(internet_checksum(&response, icmp_packet_size));
|
||||
// FIXME: What is the right TTL value here? Is 64 ok? Should we use the same TTL as the echo request?
|
||||
auto response_buffer = UserOrKernelBuffer::for_kernel_buffer((u8*)&response);
|
||||
adapter->send_ipv4(eth.source(), ipv4_packet.source(), IPv4Protocol::ICMP, response_buffer, buffer.size(), 64);
|
||||
[[maybe_unused]] auto result = adapter->send_ipv4(eth.source(), ipv4_packet.source(), IPv4Protocol::ICMP, response_buffer, buffer.size(), 64);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue