summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-07-04 17:18:38 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-07-04 17:18:38 +0000
commit2ee332f19d8c17ffec6b2885a1433ae59f06f12d (patch)
treee53c6117b2c1f7dd3d3f47a0e792d275a5042f60 /sys/net
parent1d6ba361256794025c99f959fe4f468398aae833 (diff)
logging should be in debug mode only. if every network driver did a
dmesg printf everytime they came up, would that be a better world?
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_spppsubr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index 06cdcef41df..0d24a14d2e0 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_spppsubr.c,v 1.40 2006/07/02 11:01:06 reyk Exp $ */
+/* $OpenBSD: if_spppsubr.c,v 1.41 2006/07/04 17:18:37 deraadt Exp $ */
/*
* Synchronous PPP/Cisco link level subroutines.
* Keepalive protocol implemented in both Cisco and PPP modes.
@@ -1130,7 +1130,8 @@ sppp_cisco_input(struct sppp *sp, struct mbuf *m)
if (! (ifp->if_flags & IFF_UP) &&
(ifp->if_flags & IFF_RUNNING)) {
if_up(ifp);
- log(LOG_INFO, SPP_FMT "up\n", SPP_ARGS(ifp));
+ if (debug)
+ log(LOG_INFO, SPP_FMT "up\n", SPP_ARGS(ifp));
}
break;
case CISCO_ADDR_REQ:
@@ -2378,7 +2379,8 @@ sppp_lcp_tlu(struct sppp *sp)
(ifp->if_flags & IFF_RUNNING)) {
/* Coming out of loopback mode. */
if_up(ifp);
- log(LOG_INFO, SPP_FMT "up\n", SPP_ARGS(ifp));
+ if (ifp->if_flags & IFF_DEBUG)
+ log(LOG_INFO, SPP_FMT "up\n", SPP_ARGS(ifp));
}
for (i = 0; i < IDX_COUNT; i++)