diff options
author | darrenr <darrenr@FreeBSD.org> | 2007-10-18 21:42:51 +0000 |
---|---|---|
committer | darrenr <darrenr@FreeBSD.org> | 2007-10-18 21:42:51 +0000 |
commit | 71e82d94e82560b20789833f60056506de34de8b (patch) | |
tree | da6aaa7272c76c9c4cad931122fd1f4e4db237a5 /contrib/ipfilter/lib/printpool_live.c | |
parent | e2e28d4361fc9bdb67694eedaf349bdc7ca088a3 (diff) | |
download | FreeBSD-src-71e82d94e82560b20789833f60056506de34de8b.zip FreeBSD-src-71e82d94e82560b20789833f60056506de34de8b.tar.gz |
Import IPFilter 4.1.28
Diffstat (limited to 'contrib/ipfilter/lib/printpool_live.c')
-rw-r--r-- | contrib/ipfilter/lib/printpool_live.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/contrib/ipfilter/lib/printpool_live.c b/contrib/ipfilter/lib/printpool_live.c index 0588cfb..e228a39 100644 --- a/contrib/ipfilter/lib/printpool_live.c +++ b/contrib/ipfilter/lib/printpool_live.c @@ -52,11 +52,12 @@ int opts; while (!last && (ioctl(fd, SIOCLOOKUPITER, &obj) == 0)) { if (entry.ipn_next == NULL) last = 1; - entry.ipn_next = top; - top = malloc(sizeof(*top)); - if (top == NULL) + node = malloc(sizeof(*top)); + if (node == NULL) break; - bcopy(&entry, top, sizeof(entry)); + bcopy(&entry, node, sizeof(entry)); + node->ipn_next = top; + top = node; } while (top != NULL) { @@ -74,5 +75,9 @@ int opts; if ((opts & OPT_DEBUG) == 0) PRINTF(" };\n"); + + if (ioctl(fd, SIOCIPFDELTOK, &iter.ili_key) != 0) + perror("SIOCIPFDELTOK"); + return pool->ipo_next; } |