summaryrefslogtreecommitdiff
path: root/sbin/dhclient/dhclient.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2009-06-06 04:02:43 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2009-06-06 04:02:43 +0000
commit6ab1d49e9d67904695f4398a2d1b6aa1d86de58d (patch)
tree66380185d1c248a386a1002ec4efd0ca652c06b4 /sbin/dhclient/dhclient.c
parent007d82e7701a10af43df89aaf33bf1a4e951a00a (diff)
Nuke debug() unless DEBUG is defined. Elminates debug output from
normal operations. Prodded by deraadt@ a while ago.
Diffstat (limited to 'sbin/dhclient/dhclient.c')
-rw-r--r--sbin/dhclient/dhclient.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 2e15b7141ec..9c96272943d 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.128 2009/06/03 02:05:34 stevesk Exp $ */
+/* $OpenBSD: dhclient.c,v 1.129 2009/06/06 04:02:42 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -232,9 +232,11 @@ routehandler(void)
linkstat =
LINK_STATE_IS_UP(ifm->ifm_data.ifi_link_state) ? 1 : 0;
if (linkstat != ifi->linkstat) {
+#ifdef DEBUG
debug("link state %s -> %s",
ifi->linkstat ? "up" : "down",
linkstat ? "up" : "down");
+#endif
ifi->linkstat = interface_link_status(ifi->name);
if (ifi->linkstat) {
client->state = S_INIT;
@@ -762,7 +764,9 @@ dhcpoffer(struct iaddr client_addr, struct option_data *options)
if (lease->address.len == sizeof(client->packet.yiaddr) &&
!memcmp(lease->address.iabuf,
&client->packet.yiaddr, lease->address.len)) {
+#ifdef DEBUG
debug("%s already seen.", name);
+#endif
return;
}
}