diff options
author | brian <brian@FreeBSD.org> | 1998-11-10 00:32:39 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1998-11-10 00:32:39 +0000 |
commit | db548a3fc5982cf0997df5d6011278adb74050d7 (patch) | |
tree | 61c137dc8de9060e34426669ccff2789e71cc0f0 /usr.sbin/ppp/ip.c | |
parent | 543c08c3b4c019544bf5895e75b64dba03e32130 (diff) | |
download | FreeBSD-src-db548a3fc5982cf0997df5d6011278adb74050d7.zip FreeBSD-src-db548a3fc5982cf0997df5d6011278adb74050d7.tar.gz |
Don't forget to initialise dbuff when debugging.
Diffstat (limited to 'usr.sbin/ppp/ip.c')
-rw-r--r-- | usr.sbin/ppp/ip.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.sbin/ppp/ip.c b/usr.sbin/ppp/ip.c index a7ffb30..aa7207d 100644 --- a/usr.sbin/ppp/ip.c +++ b/usr.sbin/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.52 1998/08/26 17:39:37 brian Exp $ + * $Id: ip.c,v 1.53 1998/09/17 00:45:26 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 */ |