diff options
author | joerg <joerg@FreeBSD.org> | 2001-12-26 22:36:59 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 2001-12-26 22:36:59 +0000 |
commit | 70547e89ed70bdc238efd1cf623ee7af6ebcdc84 (patch) | |
tree | 0c5f4de7404a5851e5d668cf9947f701d932d6a7 | |
parent | 1dba1c03d643c2d893efbbc7960c73a4ff928efc (diff) | |
download | FreeBSD-src-70547e89ed70bdc238efd1cf623ee7af6ebcdc84.zip FreeBSD-src-70547e89ed70bdc238efd1cf623ee7af6ebcdc84.tar.gz |
Don't log RXJ+ protocol rejects unless we are in debug mode. (RXJ-
events are always logged.) This stops sppp from spamming the syslog
files in case the remote peer is not configured to negotiate IPv6.
-rw-r--r-- | sys/net/if_spppsubr.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 440b32d..2d3d97f 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1602,12 +1602,13 @@ sppp_cp_input(const struct cp *cp, struct sppp *sp, struct mbuf *m) if (upper == NULL) catastrophic++; - log(LOG_INFO, - SPP_FMT "%s: RXJ%c (%s) for proto 0x%x (%s/%s)\n", - SPP_ARGS(ifp), cp->name, catastrophic ? '-' : '+', - sppp_cp_type_name(h->type), proto, - upper ? upper->name : "unknown", - upper ? sppp_state_name(sp->state[upper->protoidx]) : "?"); + if (catastrophic || debug) + log(catastrophic? LOG_INFO: LOG_DEBUG, + SPP_FMT "%s: RXJ%c (%s) for proto 0x%x (%s/%s)\n", + SPP_ARGS(ifp), cp->name, catastrophic ? '-' : '+', + sppp_cp_type_name(h->type), proto, + upper ? upper->name : "unknown", + upper ? sppp_state_name(sp->state[upper->protoidx]) : "?"); /* * if we got RXJ+ against conf-req, the peer does not implement |