diff options
author | brapru <brapru@pm.me> | 2021-08-15 12:13:54 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-15 21:53:29 +0200 |
commit | f633ef2af77341b48c3a240af44ec4c26f760ea7 (patch) | |
tree | 5e05c7a4d4cb5c895559e94359b80b204f06b85d /Kernel | |
parent | 6602ab27e1216bb787002152ae359f3b6fa6dcbe (diff) | |
download | serenity-f633ef2af77341b48c3a240af44ec4c26f760ea7.zip |
Kernel: Move ARP debug information to ARP_DEBUG
Previously when trying to debug the system's routing, the ARP
information would clutter the output and make it difficult to focus on
the routing decisions. It would be better to specify these
debug messages under ARP_DEBUG.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Net/Routing.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Kernel/Net/Routing.cpp b/Kernel/Net/Routing.cpp index e9f5e5111f..b3155ef65f 100644 --- a/Kernel/Net/Routing.cpp +++ b/Kernel/Net/Routing.cpp @@ -119,7 +119,7 @@ void update_arp_table(const IPv4Address& ip_addr, const MACAddress& addr, Update }); s_arp_table_block_condition->unblock(ip_addr, addr); - if constexpr (ROUTING_DEBUG) { + if constexpr (ARP_DEBUG) { arp_table().with_shared([&](const auto& table) { dmesgln("ARP table ({} entries):", table.size()); for (auto& it : table) @@ -235,12 +235,12 @@ RoutingDecision route_to(const IPv4Address& target, const IPv4Address& source, c return table.get(next_hop_ip); }); if (addr.has_value()) { - dbgln_if(ROUTING_DEBUG, "Routing: Using cached ARP entry for {} ({})", next_hop_ip, addr.value().to_string()); + dbgln_if(ARP_DEBUG, "Routing: Using cached ARP entry for {} ({})", next_hop_ip, addr.value().to_string()); return { adapter, addr.value() }; } } - dbgln_if(ROUTING_DEBUG, "Routing: Sending ARP request via adapter {} for IPv4 address {}", adapter->name(), next_hop_ip); + dbgln_if(ARP_DEBUG, "Routing: Sending ARP request via adapter {} for IPv4 address {}", adapter->name(), next_hop_ip); ARPPacket request; request.set_operation(ARPOperation::Request); @@ -253,14 +253,14 @@ RoutingDecision route_to(const IPv4Address& target, const IPv4Address& source, c if (NetworkTask::is_current()) { // FIXME: Waiting for the ARP response from inside the NetworkTask would // deadlock, so let's hope that whoever called route_to() tries again in a bit. - dbgln_if(ROUTING_DEBUG, "Routing: Not waiting for ARP response from inside NetworkTask, sent ARP request using adapter {} for {}", adapter->name(), target); + dbgln_if(ARP_DEBUG, "Routing: Not waiting for ARP response from inside NetworkTask, sent ARP request using adapter {} for {}", adapter->name(), target); return { nullptr, {} }; } Optional<MACAddress> addr; if (!Thread::current()->block<ARPTableBlocker>({}, next_hop_ip, addr).was_interrupted()) { if (addr.has_value()) { - dbgln_if(ROUTING_DEBUG, "Routing: Got ARP response using adapter {} for {} ({})", + dbgln_if(ARP_DEBUG, "Routing: Got ARP response using adapter {} for {} ({})", adapter->name(), next_hop_ip, addr.value().to_string()); |