From cabe7e7062b1146605ab61e5ee6d433fb0e3da90 Mon Sep 17 00:00:00 2001 From: Can Erkin Acar Date: Tue, 11 Jul 2006 21:36:52 +0000 Subject: Only print link state changes if interface is in debug mode. Affects devices using the sppp layer (pppoe, art, san, lmc) ok deraadt@ --- sys/net/if_spppsubr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sys/net') diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 0d24a14d2e0..0a4687090a3 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_spppsubr.c,v 1.41 2006/07/04 17:18:37 deraadt Exp $ */ +/* $OpenBSD: if_spppsubr.c,v 1.42 2006/07/11 21:36:51 canacar Exp $ */ /* * Synchronous PPP/Cisco link level subroutines. * Keepalive protocol implemented in both Cisco and PPP modes. @@ -4338,11 +4338,12 @@ sppp_null(struct sppp *unused) HIDE void sppp_set_phase(struct sppp *sp) { - struct ifnet *ifp = &sp->pp_if; + STDDCL; int lstate, s; - log(LOG_INFO, SPP_FMT "phase %s\n", SPP_ARGS(ifp), - sppp_phase_name(sp->pp_phase)); + if (debug) + log(LOG_INFO, SPP_FMT "phase %s\n", SPP_ARGS(ifp), + sppp_phase_name(sp->pp_phase)); /* set link state */ if (sp->pp_phase == PHASE_NETWORK) -- cgit v1.2.3