From 78ad110900563d7a163bfebd22fdf1e5879f67f9 Mon Sep 17 00:00:00 2001 From: brian Date: Tue, 10 Nov 1998 00:32:24 +0000 Subject: Don't forget to initialise dbuff when debugging. --- usr.sbin/ppp/ppp/ip.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'usr.sbin/ppp') 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 */ -- cgit v1.2.3