Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / dist / ipf / netinet / ip_log.c
blobc70a273981c16580c3ff9ce9de21612dd9dd8be2
1 /* $NetBSD$ */
3 /*
4 * Copyright (C) 1997-2003 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
8 * Id: ip_log.c,v 2.75.2.25 2009/07/22 01:46:43 darrenr Exp
9 */
11 #include <sys/cdefs.h>
12 __KERNEL_RCSID(0, "$NetBSD$");
14 #include <sys/param.h>
15 #if defined(KERNEL) || defined(_KERNEL)
16 # undef KERNEL
17 # undef _KERNEL
18 # define KERNEL 1
19 # define _KERNEL 1
20 #endif
21 #if defined(__NetBSD__) && (NetBSD >= 199905) && !defined(IPFILTER_LKM) && \
22 defined(_KERNEL)
23 # if (__NetBSD_Version__ < 399001400)
24 # include "opt_ipfilter_log.h"
25 # else
26 # include "opt_ipfilter.h"
27 # endif
28 #endif
29 #if defined(__FreeBSD__) && !defined(IPFILTER_LKM)
30 # if defined(_KERNEL)
31 # if defined(__FreeBSD_version) && (__FreeBSD_version >= 300000)
32 # include "opt_ipfilter.h"
33 # endif
34 # else
35 # include <osreldate.h>
36 # endif
37 #endif
38 #ifndef SOLARIS
39 # define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
40 #endif
41 #include <sys/errno.h>
42 #include <sys/types.h>
43 #include <sys/file.h>
44 #ifndef _KERNEL
45 # include <stdio.h>
46 # include <string.h>
47 # include <stdlib.h>
48 # include <ctype.h>
49 # define _KERNEL
50 # define KERNEL
51 # ifdef __OpenBSD__
52 struct file;
53 # endif
54 # include <sys/uio.h>
55 # undef _KERNEL
56 # undef KERNEL
57 #endif
58 #if (defined(__FreeBSD_version) && (__FreeBSD_version >= 220000)) && \
59 defined(_KERNEL)
60 # include <sys/fcntl.h>
61 # include <sys/filio.h>
62 #else
63 # include <sys/ioctl.h>
64 #endif
65 #include <sys/time.h>
66 #if defined(_KERNEL)
67 # include <sys/systm.h>
68 # if (defined(NetBSD) && (__NetBSD_Version__ >= 104000000))
69 # include <sys/proc.h>
70 # endif
71 #endif /* _KERNEL */
72 #if !SOLARIS && !defined(__hpux) && !defined(linux)
73 # if (defined(NetBSD) && (NetBSD > 199609)) || \
74 (defined(OpenBSD) && (OpenBSD > 199603)) || \
75 (defined(__FreeBSD_version) && (__FreeBSD_version >= 300000))
76 # include <sys/dirent.h>
77 # else
78 # include <sys/dir.h>
79 # endif
80 # include <sys/mbuf.h>
81 # include <sys/select.h>
82 # if __FreeBSD_version >= 500000
83 # include <sys/selinfo.h>
84 # endif
85 #else
86 # if !defined(__hpux) && defined(_KERNEL)
87 # include <sys/filio.h>
88 # include <sys/cred.h>
89 # include <sys/ddi.h>
90 # include <sys/sunddi.h>
91 # include <sys/ksynch.h>
92 # include <sys/kmem.h>
93 # include <sys/mkdev.h>
94 # include <sys/dditypes.h>
95 # include <sys/cmn_err.h>
96 # endif /* !__hpux */
97 #endif /* !SOLARIS && !__hpux */
98 #if !defined(linux)
99 # include <sys/protosw.h>
100 #endif
101 #include <sys/socket.h>
103 #include <net/if.h>
104 #ifdef sun
105 # include <net/af.h>
106 #endif
107 #if __FreeBSD_version >= 300000
108 # include <net/if_var.h>
109 #endif
110 #include <netinet/in.h>
111 #ifdef __sgi
112 # include <sys/ddi.h>
113 # ifdef IFF_DRVRLOCK /* IRIX6 */
114 # include <sys/hashing.h>
115 # endif
116 #endif
117 #if !defined(__hpux) && !defined(linux) && \
118 !(defined(__sgi) && !defined(IFF_DRVRLOCK)) /*IRIX<6*/
119 # include <netinet/in_var.h>
120 #endif
121 #include <netinet/in_systm.h>
122 #include <netinet/ip.h>
123 #include <netinet/tcp.h>
124 #include <netinet/udp.h>
125 #include <netinet/ip_icmp.h>
126 #ifdef USE_INET6
127 # include <netinet/icmp6.h>
128 #endif
129 #if !defined(linux)
130 # include <netinet/ip_var.h>
131 #endif
132 #ifndef _KERNEL
133 # include <syslog.h>
134 #endif
135 #include "netinet/ip_compat.h"
136 #include <netinet/tcpip.h>
137 #include "netinet/ip_fil.h"
138 #include "netinet/ip_nat.h"
139 #include "netinet/ip_frag.h"
140 #include "netinet/ip_state.h"
141 #include "netinet/ip_auth.h"
142 #if (__FreeBSD_version >= 300000) || defined(__NetBSD__)
143 # include <sys/malloc.h>
144 #endif
145 /* END OF INCLUDES */
147 #ifdef IPFILTER_LOG
149 # if defined(IPL_SELECT)
150 # include <machine/sys/user.h>
151 # include <sys/kthread_iface.h>
152 # define READ_COLLISION 0x001
154 iplog_select_t iplog_ss[IPL_LOGSIZE];
156 extern int selwait;
157 # endif /* IPL_SELECT */
159 # if defined(linux) && defined(_KERNEL)
160 wait_queue_head_t iplh_linux[IPL_LOGSIZE];
161 # endif
162 # if SOLARIS && defined(_KERNEL)
163 extern kcondvar_t iplwait;
164 extern struct pollhead iplpollhead[IPL_LOGSIZE];
165 # endif
167 iplog_t **iplh[IPL_LOGSIZE], *iplt[IPL_LOGSIZE], *ipll[IPL_LOGSIZE];
168 int iplused[IPL_LOGSIZE];
169 static fr_info_t iplcrc[IPL_LOGSIZE];
170 int ipl_suppress = 1;
171 int ipl_logmax = IPL_LOGMAX;
172 int ipl_logall = 0;
173 int ipl_log_init = 0;
174 int ipl_logsize = IPFILTER_LOGSIZE;
175 int ipl_magic[IPL_LOGSIZE] = { IPL_MAGIC, IPL_MAGIC_NAT, IPL_MAGIC_STATE,
176 IPL_MAGIC, IPL_MAGIC, IPL_MAGIC,
177 IPL_MAGIC, IPL_MAGIC };
180 /* ------------------------------------------------------------------------ */
181 /* Function: fr_loginit */
182 /* Returns: int - 0 == success (always returned) */
183 /* Parameters: Nil */
184 /* */
185 /* Initialise log buffers & pointers. Also iniialised the CRC to a local */
186 /* secret for use in calculating the "last log checksum". */
187 /* ------------------------------------------------------------------------ */
188 int fr_loginit()
190 int i;
192 for (i = IPL_LOGMAX; i >= 0; i--) {
193 iplt[i] = NULL;
194 ipll[i] = NULL;
195 iplh[i] = &iplt[i];
196 iplused[i] = 0;
197 bzero((char *)&iplcrc[i], sizeof(iplcrc[i]));
198 # ifdef IPL_SELECT
199 iplog_ss[i].read_waiter = 0;
200 iplog_ss[i].state = 0;
201 # endif
202 # if defined(linux) && defined(_KERNEL)
203 init_waitqueue_head(iplh_linux + i);
204 # endif
207 # if SOLARIS && defined(_KERNEL)
208 cv_init(&iplwait, "ipl condvar", CV_DRIVER, NULL);
209 # endif
210 MUTEX_INIT(&ipl_mutex, "ipf log mutex");
212 ipl_log_init = 1;
214 return 0;
218 /* ------------------------------------------------------------------------ */
219 /* Function: fr_logunload */
220 /* Returns: Nil */
221 /* Parameters: Nil */
222 /* */
223 /* Clean up any log data that has accumulated without being read. */
224 /* ------------------------------------------------------------------------ */
225 void fr_logunload()
227 int i;
229 if (ipl_log_init == 0)
230 return;
232 for (i = IPL_LOGMAX; i >= 0; i--)
233 (void) ipflog_clear(i);
235 # if SOLARIS && defined(_KERNEL)
236 cv_destroy(&iplwait);
237 # endif
238 MUTEX_DESTROY(&ipl_mutex);
240 ipl_log_init = 0;
244 /* ------------------------------------------------------------------------ */
245 /* Function: ipflog */
246 /* Returns: int - 0 == success, -1 == failure */
247 /* Parameters: fin(I) - pointer to packet information */
248 /* flags(I) - flags from filter rules */
249 /* */
250 /* Create a log record for a packet given that it has been triggered by a */
251 /* rule (or the default setting). Calculate the transport protocol header */
252 /* size using predetermined size of a couple of popular protocols and thus */
253 /* how much data to copy into the log, including part of the data body if */
254 /* requested. */
255 /* ------------------------------------------------------------------------ */
256 int ipflog(fin, flags)
257 fr_info_t *fin;
258 u_int flags;
260 register size_t hlen;
261 int types[2], mlen;
262 size_t sizes[2];
263 void *ptrs[2];
264 ipflog_t ipfl;
265 u_char p;
266 mb_t *m;
267 # if (SOLARIS || defined(__hpux)) && defined(_KERNEL) && \
268 !defined(_INET_IP_STACK_H)
269 qif_t *ifp;
270 # else
271 struct ifnet *ifp;
272 # endif /* SOLARIS || __hpux */
274 m = fin->fin_m;
275 if (m == NULL)
276 return -1;
278 ipfl.fl_nattag.ipt_num[0] = 0;
279 ifp = fin->fin_ifp;
280 if (fin->fin_exthdr != NULL)
281 hlen = (char *)fin->fin_dp - (char *)fin->fin_ip;
282 else
283 hlen = fin->fin_hlen;
285 * calculate header size.
287 if (fin->fin_off == 0) {
288 p = fin->fin_fi.fi_p;
289 if (p == IPPROTO_TCP)
290 hlen += MIN(sizeof(tcphdr_t), fin->fin_dlen);
291 else if (p == IPPROTO_UDP)
292 hlen += MIN(sizeof(udphdr_t), fin->fin_dlen);
293 else if (p == IPPROTO_ICMP) {
294 struct icmp *icmp;
296 icmp = (struct icmp *)fin->fin_dp;
299 * For ICMP, if the packet is an error packet, also
300 * include the information about the packet which
301 * caused the error.
303 switch (icmp->icmp_type)
305 case ICMP_UNREACH :
306 case ICMP_SOURCEQUENCH :
307 case ICMP_REDIRECT :
308 case ICMP_TIMXCEED :
309 case ICMP_PARAMPROB :
310 hlen += MIN(sizeof(struct icmp) + 8,
311 fin->fin_dlen);
312 break;
313 default :
314 hlen += MIN(sizeof(struct icmp),
315 fin->fin_dlen);
316 break;
319 # ifdef USE_INET6
320 else if (p == IPPROTO_ICMPV6) {
321 struct icmp6_hdr *icmp;
323 icmp = (struct icmp6_hdr *)fin->fin_dp;
326 * For ICMPV6, if the packet is an error packet, also
327 * include the information about the packet which
328 * caused the error.
330 if (icmp->icmp6_type < 128) {
331 hlen += MIN(sizeof(struct icmp6_hdr) + 8,
332 fin->fin_dlen);
333 } else {
334 hlen += MIN(sizeof(struct icmp6_hdr),
335 fin->fin_dlen);
338 # endif
341 * Get the interface number and name to which this packet is
342 * currently associated.
344 # if (SOLARIS || defined(__hpux)) && defined(_KERNEL) && \
345 !defined(_INET_IP_STACK_H)
346 ipfl.fl_unit = (u_int)ifp->qf_ppa;
347 COPYIFNAME(fin->fin_v, ifp, ipfl.fl_ifname);
348 # else
349 # if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199603)) || \
350 (defined(OpenBSD) && (OpenBSD >= 199603)) || defined(linux) || \
351 (defined(__FreeBSD__) && (__FreeBSD_version >= 501113)) || \
352 (SOLARIS && defined(_INET_IP_STACK_H))
353 COPYIFNAME(fin->fin_v, ifp, ipfl.fl_ifname);
354 # else
355 ipfl.fl_unit = (u_int)ifp->if_unit;
356 # if defined(_KERNEL)
357 if ((ipfl.fl_ifname[0] = ifp->if_name[0]))
358 if ((ipfl.fl_ifname[1] = ifp->if_name[1]))
359 if ((ipfl.fl_ifname[2] = ifp->if_name[2]))
360 ipfl.fl_ifname[3] = ifp->if_name[3];
361 # else
362 COPYIFNAME(fin->fin_v, ifp, ipfl.fl_ifname);
363 ipfl.fl_ifname[sizeof(ipfl.fl_ifname) - 1] = '\0';
364 # endif
365 # endif
366 # endif /* __hpux || SOLARIS */
367 mlen = fin->fin_plen - hlen;
368 if (!ipl_logall) {
369 mlen = (flags & FR_LOGBODY) ? MIN(mlen, 128) : 0;
370 } else if ((flags & FR_LOGBODY) == 0) {
371 mlen = 0;
373 if (mlen < 0)
374 mlen = 0;
375 ipfl.fl_plen = (u_char)mlen;
376 ipfl.fl_hlen = (u_char)hlen;
377 ipfl.fl_rule = fin->fin_rule;
378 (void) strncpy(ipfl.fl_group, fin->fin_group, FR_GROUPLEN);
379 if (fin->fin_fr != NULL) {
380 ipfl.fl_loglevel = fin->fin_fr->fr_loglevel;
381 ipfl.fl_logtag = fin->fin_fr->fr_logtag;
382 } else {
383 ipfl.fl_loglevel = 0xffff;
384 ipfl.fl_logtag = FR_NOLOGTAG;
386 if (fin->fin_nattag != NULL)
387 bcopy(fin->fin_nattag, (void *)&ipfl.fl_nattag,
388 sizeof(ipfl.fl_nattag));
389 ipfl.fl_flags = flags;
390 ipfl.fl_dir = fin->fin_out;
391 ipfl.fl_lflags = fin->fin_flx;
392 ptrs[0] = (void *)&ipfl;
393 sizes[0] = sizeof(ipfl);
394 types[0] = 0;
395 # if defined(MENTAT) && defined(_KERNEL)
397 * Are we copied from the mblk or an aligned array ?
399 if (fin->fin_ip == (ip_t *)m->b_rptr) {
400 ptrs[1] = m;
401 sizes[1] = hlen + mlen;
402 types[1] = 1;
403 } else {
404 ptrs[1] = fin->fin_ip;
405 sizes[1] = hlen + mlen;
406 types[1] = 0;
408 # else
409 ptrs[1] = m;
410 sizes[1] = hlen + mlen;
411 types[1] = 1;
412 # endif /* MENTAT */
413 return ipllog(IPL_LOGIPF, fin, ptrs, sizes, types, 2);
417 /* ------------------------------------------------------------------------ */
418 /* Function: ipllog */
419 /* Returns: int - 0 == success, -1 == failure */
420 /* Parameters: dev(I) - device that owns this log record */
421 /* fin(I) - pointer to packet information */
422 /* items(I) - array of pointers to log data */
423 /* itemsz(I) - array of size of valid memory pointed to */
424 /* types(I) - type of data pointed to by items pointers */
425 /* cnt(I) - number of elements in arrays items/itemsz/types */
426 /* */
427 /* Takes an array of parameters and constructs one record to include the */
428 /* miscellaneous packet information, as well as packet data, for reading */
429 /* from the log device. */
430 /* ------------------------------------------------------------------------ */
431 int ipllog(dev, fin, items, itemsz, types, cnt)
432 int dev;
433 fr_info_t *fin;
434 void **items;
435 size_t *itemsz;
436 int *types, cnt;
438 char *buf, *ptr;
439 iplog_t *ipl;
440 size_t len;
441 int i;
442 SPL_INT(s);
445 * Get the total amount of data to be logged.
447 for (i = 0, len = sizeof(iplog_t); i < cnt; i++)
448 len += itemsz[i];
451 * check that we have space to record this information and can
452 * allocate that much.
454 if ((iplused[dev] + len) > ipl_logsize)
455 return -1;
457 KMALLOCS(buf, char *, len);
458 if (buf == NULL)
459 return -1;
460 ipl = (iplog_t *)buf;
461 ipl->ipl_magic = ipl_magic[dev];
462 ipl->ipl_count = 1;
463 ipl->ipl_next = NULL;
464 ipl->ipl_dsize = len;
465 #ifdef _KERNEL
466 GETKTIME(&ipl->ipl_sec);
467 #else
468 ipl->ipl_sec = 0;
469 ipl->ipl_usec = 0;
470 #endif
473 * Loop through all the items to be logged, copying each one to the
474 * buffer. Use bcopy for normal data or the mb_t copyout routine.
476 for (i = 0, ptr = buf + sizeof(*ipl); i < cnt; i++) {
477 if (types[i] == 0) {
478 memcpy(ptr, items[i], itemsz[i]);
479 } else if (types[i] == 1) {
480 COPYDATA(items[i], 0, itemsz[i], (char *)ptr);
482 ptr += itemsz[i];
485 SPL_NET(s);
486 MUTEX_ENTER(&ipl_mutex);
488 * Check to see if this log record has a CRC which matches the last
489 * record logged. If it does, just up the count on the previous one
490 * rather than create a new one.
492 if (ipl_suppress) {
493 if ((fin != NULL) && (fin->fin_off == 0)) {
494 if ((ipll[dev] != NULL) &&
495 bcmp((char *)fin, (char *)&iplcrc[dev],
496 FI_LCSIZE) == 0) {
497 ipll[dev]->ipl_count++;
498 MUTEX_EXIT(&ipl_mutex);
499 SPL_X(s);
500 KFREES(buf, len);
501 return 0;
503 bcopy((char *)fin, (char *)&iplcrc[dev], FI_LCSIZE);
504 } else
505 bzero((char *)&iplcrc[dev], FI_CSIZE);
509 * advance the log pointer to the next empty record and deduct the
510 * amount of space we're going to use.
512 ipll[dev] = ipl;
513 *iplh[dev] = ipl;
514 iplh[dev] = &ipl->ipl_next;
515 iplused[dev] += len;
518 * Now that the log record has been completed and added to the queue,
519 * wake up any listeners who may want to read it.
521 # if SOLARIS && defined(_KERNEL)
522 cv_signal(&iplwait);
523 MUTEX_EXIT(&ipl_mutex);
524 pollwakeup(&iplpollhead[dev], POLLRDNORM);
525 # else
526 MUTEX_EXIT(&ipl_mutex);
527 WAKEUP(iplh, dev);
528 POLLWAKEUP(dev);
529 # endif
530 SPL_X(s);
531 # ifdef IPL_SELECT
532 iplog_input_ready(dev);
533 # endif
534 return 0;
538 /* ------------------------------------------------------------------------ */
539 /* Function: ipflog_read */
540 /* Returns: int - 0 == success, else error value. */
541 /* Parameters: unit(I) - device we are reading from */
542 /* uio(O) - pointer to information about where to store data */
543 /* */
544 /* Called to handle a read on an IPFilter device. Returns only complete */
545 /* log messages - will not partially copy a log record out to userland. */
546 /* */
547 /* NOTE: This function will block and wait for a signal to return data if */
548 /* there is none present. Asynchronous I/O is not implemented. */
549 /* ------------------------------------------------------------------------ */
550 int ipflog_read(unit, uio)
551 minor_t unit;
552 struct uio *uio;
554 size_t dlen, copied;
555 int error = 0;
556 iplog_t *ipl;
557 SPL_INT(s);
560 * Sanity checks. Make sure the minor # is valid and we're copying
561 * a valid chunk of data.
563 if (IPL_LOGMAX < unit)
564 return ENXIO;
565 if (uio->uio_resid == 0)
566 return 0;
567 if ((uio->uio_resid < sizeof(iplog_t)) ||
568 (uio->uio_resid > ipl_logsize))
569 return EINVAL;
572 * Lock the log so we can snapshot the variables. Wait for a signal
573 * if the log is empty.
575 SPL_NET(s);
576 MUTEX_ENTER(&ipl_mutex);
578 while (iplt[unit] == NULL) {
579 # if SOLARIS && defined(_KERNEL)
580 if (!cv_wait_sig(&iplwait, &ipl_mutex.ipf_lk)) {
581 MUTEX_EXIT(&ipl_mutex);
582 return EINTR;
584 # else
585 # if defined(__hpux) && defined(_KERNEL)
586 lock_t *l;
588 # ifdef IPL_SELECT
589 if (uio->uio_fpflags & (FNBLOCK|FNDELAY)) {
590 /* this is no blocking system call */
591 MUTEX_EXIT(&ipl_mutex);
592 return 0;
594 # endif
596 MUTEX_EXIT(&ipl_mutex);
597 l = get_sleep_lock(&iplh[unit]);
598 error = sleep(&iplh[unit], PZERO+1);
599 spinunlock(l);
600 # else
601 # if defined(__osf__) && defined(_KERNEL)
602 error = mpsleep(&iplh[unit], PSUSP|PCATCH, "iplread", 0,
603 &ipl_mutex, MS_LOCK_SIMPLE);
604 # else
605 MUTEX_EXIT(&ipl_mutex);
606 SPL_X(s);
607 error = SLEEP(unit + iplh, "ipl sleep");
608 # endif /* __osf__ */
609 # endif /* __hpux */
610 if (error)
611 return error;
612 SPL_NET(s);
613 MUTEX_ENTER(&ipl_mutex);
614 # endif /* SOLARIS */
617 # if (defined(BSD) && (BSD >= 199101)) || defined(__FreeBSD__) || \
618 defined(__osf__)
619 uio->uio_rw = UIO_READ;
620 # endif
622 for (copied = 0; (ipl = iplt[unit]) != NULL; copied += dlen) {
623 dlen = ipl->ipl_dsize;
624 if (dlen > uio->uio_resid)
625 break;
627 * Don't hold the mutex over the uiomove call.
629 iplt[unit] = ipl->ipl_next;
630 iplused[unit] -= dlen;
631 MUTEX_EXIT(&ipl_mutex);
632 SPL_X(s);
633 error = UIOMOVE((void *)ipl, dlen, UIO_READ, uio);
634 if (error) {
635 SPL_NET(s);
636 MUTEX_ENTER(&ipl_mutex);
637 ipl->ipl_next = iplt[unit];
638 iplt[unit] = ipl;
639 iplused[unit] += dlen;
640 break;
642 MUTEX_ENTER(&ipl_mutex);
643 KFREES((void *)ipl, dlen);
644 SPL_NET(s);
646 if (!iplt[unit]) {
647 iplused[unit] = 0;
648 iplh[unit] = &iplt[unit];
649 ipll[unit] = NULL;
652 MUTEX_EXIT(&ipl_mutex);
653 SPL_X(s);
654 return error;
658 /* ------------------------------------------------------------------------ */
659 /* Function: ipflog_clear */
660 /* Returns: int - number of log bytes cleared. */
661 /* Parameters: unit(I) - device we are reading from */
662 /* */
663 /* Deletes all queued up log records for a given output device. */
664 /* ------------------------------------------------------------------------ */
665 int ipflog_clear(unit)
666 minor_t unit;
668 iplog_t *ipl;
669 int used;
670 SPL_INT(s);
672 SPL_NET(s);
673 MUTEX_ENTER(&ipl_mutex);
674 while ((ipl = iplt[unit]) != NULL) {
675 iplt[unit] = ipl->ipl_next;
676 KFREES((void *)ipl, ipl->ipl_dsize);
678 iplh[unit] = &iplt[unit];
679 ipll[unit] = NULL;
680 used = iplused[unit];
681 iplused[unit] = 0;
682 bzero((char *)&iplcrc[unit], FI_CSIZE);
683 MUTEX_EXIT(&ipl_mutex);
684 SPL_X(s);
685 return used;
689 /* ------------------------------------------------------------------------ */
690 /* Function: ipflog_canread */
691 /* Returns: int - 0 == no data to read, 1 = data present */
692 /* Parameters: unit(I) - device we are reading from */
693 /* */
694 /* Returns an indication of whether or not there is data present in the */
695 /* current buffer for the selected ipf device. */
696 /* ------------------------------------------------------------------------ */
697 int ipflog_canread(unit)
698 int unit;
700 return iplt[unit] != NULL;
702 #endif /* IPFILTER_LOG */