diff options
author | brian <brian@cvs.openbsd.org> | 1998-11-10 00:32:24 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 1998-11-10 00:32:24 +0000 |
commit | 78ad110900563d7a163bfebd22fdf1e5879f67f9 (patch) | |
tree | 4498d172dbbf833b24b6c41069319fe055895fc9 /usr.sbin/ppp | |
parent | 8bfcefb7ca259acbdbf419d99db46d0876149fff (diff) |
Don't forget to initialise dbuff when debugging.
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/ppp/ip.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.sbin/ppp/ppp/ip.c b/usr.sbin/ppp/ppp/ip.c index 20a1d769fdd..fa2fda2938b 100644 --- a/usr.sbin/ppp/ppp/ip.c +++ b/usr.sbin/ppp/ppp/ip.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: ip.c,v 1.2 1998/08/31 08:16:38 brian Exp $ + * $Id: ip.c,v 1.3 1998/11/10 00:32:23 brian Exp $ * * TODO: * o Return ICMP message for filterd packet @@ -160,10 +160,14 @@ FilterCheck(struct ip *pip, struct filter *filter) estab = (th->th_flags & TH_ACK); syn = (th->th_flags & TH_SYN); finrst = (th->th_flags & (TH_FIN|TH_RST)); - if (log_IsKept(LogDEBUG) && !estab) - snprintf(dbuff, sizeof dbuff, - "flags = %02x, sport = %d, dport = %d", - th->th_flags, sport, dport); + if (log_IsKept(LogDEBUG)) { + if (!estab) + snprintf(dbuff, sizeof dbuff, + "flags = %02x, sport = %d, dport = %d", + th->th_flags, sport, dport); + else + *dbuff = '\0'; + } break; default: return (A_DENY); /* We'll block unknown type of packet */ |