diff options
author | Can Erkin Acar <canacar@cvs.openbsd.org> | 2006-07-11 21:36:52 +0000 |
---|---|---|
committer | Can Erkin Acar <canacar@cvs.openbsd.org> | 2006-07-11 21:36:52 +0000 |
commit | cabe7e7062b1146605ab61e5ee6d433fb0e3da90 (patch) | |
tree | b67f3d6a94142eb48f9e28493c10ef170ad9e000 /sys/net/if_spppsubr.c | |
parent | ab4f9f69672a8814b0ca3b7afa64c51d376cf641 (diff) |
Only print link state changes if interface is in debug mode.
Affects devices using the sppp layer (pppoe, art, san, lmc)
ok deraadt@
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r-- | sys/net/if_spppsubr.c | 9 |
1 files changed, 5 insertions, 4 deletions
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) |