mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-10 13:04:53 -04:00
Improve DHCP tracing
This commit is contained in:
parent
e8c3d5addc
commit
b6794a15e9
@ -134,6 +134,8 @@ std::expected<network::dhcp::dhcp_configuration> network::dhcp::layer::request_i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logging::logf(logging::log_level::TRACE, "dhcp: Sent request\n");
|
||||||
|
|
||||||
// 2. Receive DHCP Offer
|
// 2. Receive DHCP Offer
|
||||||
|
|
||||||
network::ip::address offer_address;
|
network::ip::address offer_address;
|
||||||
@ -146,6 +148,8 @@ std::expected<network::dhcp::dhcp_configuration> network::dhcp::layer::request_i
|
|||||||
|
|
||||||
{
|
{
|
||||||
while (true) {
|
while (true) {
|
||||||
|
logging::logf(logging::log_level::TRACE, "dhcp: Wait for answer\n");
|
||||||
|
|
||||||
if (packets.empty()) {
|
if (packets.empty()) {
|
||||||
listen_queue.wait();
|
listen_queue.wait();
|
||||||
}
|
}
|
||||||
@ -372,5 +376,7 @@ std::expected<network::dhcp::dhcp_configuration> network::dhcp::layer::request_i
|
|||||||
conf.gateway_address = gateway_address;
|
conf.gateway_address = gateway_address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logging::logf(logging::log_level::TRACE, "dhcp: Finished discovery\n");
|
||||||
|
|
||||||
return {conf};
|
return {conf};
|
||||||
}
|
}
|
||||||
|
@ -206,6 +206,8 @@ void network_discovery() {
|
|||||||
dns_address = network::ip::make_address(10, 0, 2, 2);
|
dns_address = network::ip::make_address(10, 0, 2, 2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
logging::logf(logging::log_level::TRACE, "network: impossible to acquire address for interface %u\n", interface.id);
|
||||||
|
|
||||||
// Defaults for Qemu (better than nothing)
|
// Defaults for Qemu (better than nothing)
|
||||||
interface.ip_address = network::ip::make_address(10, 0, 2, 15);
|
interface.ip_address = network::ip::make_address(10, 0, 2, 15);
|
||||||
interface.gateway = network::ip::make_address(10, 0, 2, 2);
|
interface.gateway = network::ip::make_address(10, 0, 2, 2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user