hrev52060 adds 1 changeset to branch 'master'
old head: a7abbdae773102efa6c570c1f10a99a0b848c171
new head: 42080aceac5031e895c645d075035d417906c932
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=42080aceac50+%5Ea7abbdae7731
----------------------------------------------------------------------------
42080aceac50: DHCPClient: Tweaks to logging.
* "timeout" is in usecs, so / 1000 and say "msecs" not "secs"
* Debug-log messages that are not for us received while waiting for
a message that is for us. Hopefully this will not flood the syslog
(DHCP renegotiation is, after all, rare), and it might help diagnose
some of the DHCP failures.
[ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev52060
Commit: 42080aceac5031e895c645d075035d417906c932
URL: https://git.haiku-os.org/haiku/commit/?id=42080aceac50
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Tue Jul 3 20:14:22 2018 UTC
----------------------------------------------------------------------------
1 file changed, 6 insertions(+), 3 deletions(-)
src/servers/net/DHCPClient.cpp | 9 ++++++---
----------------------------------------------------------------------------
diff --git a/src/servers/net/DHCPClient.cpp b/src/servers/net/DHCPClient.cpp
index 7ae8755cf3..8781fef802 100644
--- a/src/servers/net/DHCPClient.cpp
+++ b/src/servers/net/DHCPClient.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2011, Haiku, Inc. All Rights Reserved.
+ * Copyright 2006-2018, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -460,8 +460,8 @@ socket_timeout::Shift(int socket, bigtime_t stateMaxTime,
const char* device)
timeout = std::max(remaining, bigtime_t(60));
}
- syslog(LOG_DEBUG, "%s: Timeout shift: %lu secs (try %lu)\n",
- device, timeout, tries);
+ syslog(LOG_DEBUG, "%s: Timeout shift: %lu msecs (try %lu)\n",
+ device, timeout / 1000, tries);
UpdateSocket(socket);
return true;
@@ -746,6 +746,9 @@ DHCPClient::_StateTransition(int socket, dhcp_state& state)
|| memcmp(message->mac_address, discover.mac_address,
discover.hardware_address_length)) {
// this message is not for us
+ syslog(LOG_DEBUG, "%s: Ignoring %s not for us from
%s\n",
+ Device(),
dhcp_message::TypeToString(message->Type()),
+
_AddressToString(from.sin_addr.s_addr).String());
continue;
}